[PATCH] SBUS: Include config.h for enabling function in stdio.h
by Lukas Slebodnik
ehlo,
Older versions of glibc requires extra feature macros
for function open_memstream.
fmemopen(), open_memstream(), open_wmemstream():
Since glibc 2.10:
_XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
Before glibc 2.10:
_GNU_SOURCE
LS
8 years
[PATCH] SDAP: Use portable constant as level in setsockopt
by Lukas Slebodnik
ehlo,
The macros SOL_TCP and IPPROTO_TCP have the same value on linux,
but the first one is not portable.
I checked source code of other projects and they use constant IPPROTO_TCP
for seting TCP_NODELAY on tcp socket.
c-ares
ares_process.c:1026: if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY,
ares_process.c-1027- (void *)&opt, sizeof(opt)) == -1)
ares_process.c-1028- {
cups
http.c-222-
http.c-223- val = 1;
http.c:224: setsockopt(http->fd, IPPROTO_TCP, TCP_NODELAY, CUPS_SOCAST &val, sizeof(val));
http.c-225-
audit
auditd-listen.c-816-
auditd-listen.c-817- /* Connection is accepted...start setting it up */
auditd-listen.c:818: setsockopt(afd, SOL_SOCKET, SO_REUSEADDR, (char *)&one, sizeof (int));
auditd-listen.c:819: setsockopt(afd, SOL_SOCKET, SO_KEEPALIVE, (char *)&one, sizeof (int));
auditd-listen.c:820: setsockopt(afd, IPPROTO_TCP, TCP_NODELAY, (char *)&one, sizeof (int));
auditd-listen.c-821- set_close_on_exec (afd);
auditd-listen.c-822-
libtircp
svc_vc.c-348- len = 1;
svc_vc.c-349- /* XXX fvdl - is this useful? */
svc_vc.c:350: setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &len, sizeof (len));
svc_vc.c-351-}
svc_vc.c-352-
valgrind
valgrind-di-server.c-1133-
valgrind-di-server.c-1134-assert(one == 1);
valgrind-di-server.c:1135:int ret = setsockopt( new_sd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
valgrind-di-server.c-1136-assert(ret != -1);
valgrind-di-server.c-1137-
openldap
daemon.c-1918- /* enable no delay */
daemon.c-1919- tmp = 1;
daemon.c:1920: rc = setsockopt( s, IPPROTO_TCP, TCP_NODELAY,
daemon.c-1921- (char *)&tmp, sizeof(tmp) );
daemon.c-1922- if ( rc == AC_SOCKET_ERROR ) {
Simple patch is attached.
LS
8 years
[PATCH] pam_sss: add ignore_unknown_user option
by Pete Fritchman
https://fedorahosted.org/sssd/ticket/2232
FreeBSD's openpam doesn't have a built in way of ignoring an unknown
user (e.g. treating PAM_USER_UNKNOWN as a pass for a required module,
like Linux's user_unknown=ignore tag), so there needs to be an
ignore_unknown_user flag built in to the PAM module. This patch makes
pam_sss return PAM_IGNORE instead of PAM_USER_UNKNOWN when
ignore_unknown_user is passed in from the PAM config. FWIW, this is
how pam_ldap works on FreeBSD with local accounts, too.
This patch allows us to keep pam_sss marked as required for the PAM
"account" facility (to enforce HBAC rules) but still allow local users
to log in.
jhrozek suggested posting the patch here for review, so thanks in
advance for looking it over!
--
petef
8 years
[PATCH] UTIL: Fix order of header files.
by Lukas Slebodnik
ehlo,
The older versions of glibc and different implementations of libs
requires feature macros for enabling function getline.
getline(), getdelim():
Since glibc 2.10:
_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700
Before glibc 2.10:
_GNU_SOURCE
All feature macros are in header file config.h and are detected by configure
script. The header file config.h was included after few other header files.
The problem is that header files stdio.h is included just once and
is included from many external header files. We need to include config.h
before any other header file to prevent problems.
LS
8 years
[PATCH] PAM: Fix problem with missing declaration
by Lukas Slebodnik
ehlo,
The functions strdup and strncmp are used in pam_test_client,
but header file string.h was not included directly in this file.
The header file string.h was indirectly included by the header file
security/pam_client.h.
sh-4.2$ nm --undefined-only ./pam_test_client | grep -E "strdup|strncmp"
U __strdup@(a)GLIBC_2.2.5
U strncmp@(a)GLIBC_2.2.5
patch is attached.
LS
8 years
[PATCH] CRYPTO: Use unprefixed version of function stpncpy
by Lukas Slebodnik
ehlo,
glibc contains two versions of finction stpncpy
sh-4.2$ nm --dynamic --defined-only /lib64/libc.so.6 | grep stpncpy
0000003ce1c89b00 i stpncpy
0000003ce1c89b00 i __stpncpy
0000003ce1d040a0 T __stpncpy_chk
We should use more portable version of stpncpy without prefix with underscores.
The function __stpncpy was used in initial veersion
e65c65fc710fa030bfb8319efc43fcdc9ce5a26f, which was based on
http://people.redhat.com/drepper/SHA-crypt.txt
patch is simple replacement "s/__stpncpy/stpncpy/"
LS
8 years