ANNOUNCE libqb version 0.14.0
by Angus Salkeld
Hi all
Release time! It's been a while so heaps of bug fixes.
Get all the goodies here:
https://github.com/asalkeld/libqb/wiki#wiki-Releases
-Angus
LOG: fix threaded logging.
Add user control of the permissions that are set on the shared mem files
LOG: Restrict string trucation during serialization to when a precision is specified
LOG: Gracefully fail when the caller exceeds QB_LOG_MAX_LEN
LOG: Observe field widths when serializing string arguments
RB: use the same mechanism in reclaim as read/peek to detect end-of-ring
Add needs_response_ack option to ./check
RB: fix wrong sem_flg IPC_NOWAIT option
TESTS: fix warning about unused functions
Remove D_FORTIFY_SOURCE from check.
Open shared mem file in /dev/shm only for linux
Don't use msg_flags on solaris (recvmsg).
Turn off attribute_section on solaris
ipc example: add -e (events) option
IPC: if the server returns EAGAIN or ETIMEOUT the check the connection
LOG: make it possible to fsync() on each file log.
IPC: make sure that the created callback happens before dispatches
LOG: fix the printing of %p in the blackbox
IPC: On bsd's use the notifier for responses
IPC: interpret ECONNRESET and EPIPE as ENOTCONN
cleanup some warnings
config: use newer AC_COMPILE_IFELSE()
blackbox: fix %p formatting
LOG: put all fields in the blackbox (added priority and tags)
example: make the priority uint8_t
Remove strerror out of check_funcs
RB: fix compiler warning.
Add replacement function stpcpy
Add missing AC_TYPE_UINT16_T to configure.ac
Use AC_FUNC_STRERROR_R and STRERROR_R_CHAR_P
Add stpcpy strcasecmp to the check_funcs
Move some conditional defines into code (from the configure script)
Remove some unused configure checks
Remove message queues
Check for union semun properly
Blackbox: provide more space for log messages when reading from the blackbox.
Add the blackbox reader manpage to the spec file
Enable error logging for the blackbox reader
RB: Read the file size into an initialized variable of the correct size
Add a tool to dump the blackbox.
RB: to be safer save the read and write pointers at the top of the blackbox
avoid unwarranted use of strncpy: use memcpy instead
blackbox: fix the print_from_file()
RB: add an option to not use any semaphores
LOG: tweak the blackbox format string
LOG: accept NULL strings into the blackbox
LOG: protect close and reload from calling log
Add benchmark option (-b) to examples/ipcclient
TEST: make rbreader/writer more like the other benchmarking apps
IPC: log the connection description in all logs
TEST: re-organise the ipc test suites
IPC: only modify the dispatch if we get EAGAIN
Correctly display timestamp in blackbox
11 years, 9 months
A server ran by an ordinary user can be connected by another ordinary user?
by Gao,Yan
Hi,
I'm sill looking at how to fix the ACLs support of pacemaker.
AFAICS, if a server is ran by root, when a client connects to it, the
"/dev/shm/qb-*" file will be chown to the client's uid/gid. While if a
server is ran by an ordinary user and being connected by another
ordinary user, since the server doesn't have the permission to chown
the file to another user, and the file mode is 0600, so the client will
get "permission denied ".
Cib daemon runs as "uid: hacluster, gid: root", and we want all the
users in "haclient" group have access to CIB. Is there any way for cib
daemon to know the file path or the fd for a request, so that it can
change the mode/group of the file? Or are there any other solutions for
this?
Thanks,
Gao,Yan
--
Gao,Yan <ygao(a)suse.com>
Software Engineer
China Server Team, SUSE.
11 years, 9 months
Get UIDs of clients
by Gao,Yan
Hi Angus, all,
Pacemaker has completely converted to use libqb based IPC. Since
pacemaker supports ACLs for CIB, the cib daemon needs to know UIDs of
clients. We'll need to fix this part.
I gave a glance at libqb. The uid/gid appear in
qb_ipcs_connection_accept_fn() for authentication. Though it seems we
should add them into qb_ipcs_connection_stats_*, so that we could get
the info in other handlers. For example in
qb_ipcs_connection_created_fn(), we could get the info with
qb_ipcs_connection_stats_get_*() and record that through
qb_ipcs_context_set() for further use.
Does this make sense? Any suggestions would be much appreciated?
Regards,
Gao,Yan
--
Gao,Yan <ygao(a)suse.com>
Software Engineer
China Server Team, SUSE.
11 years, 9 months