Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: nscd socket activation is broken: 1) nscd.socket unit as shipped claims datagram socket while nscd listens on a stream one 2) nscd doesn't support inheriting the listening socket from the parent; it always creates its own I think nscd.socket unit file should better be removed from nscd package. Version-Release number of selected component (if applicable): nscd-2.16-30.fc18 How reproducible: 100%
Roman, (1) How did you confirm that nscd is not listening on a datagram socket? (2) How did you determine that nscd is not inheriting the listening socket from the parent? Cheers, Carlos.
> (1) How did you confirm that nscd is not listening on a datagram socket? 1) # sudo ss -lpx |grep nscd u_dgr UNCONN 0 0 /var/run/nscd/socket 15662 * 0 users:(("systemd",1,49)) u_str LISTEN 0 0 /var/run/nscd/socket 16779 * 0 users:(("nscd",580,15)) u_dgr UNCONN 0 0 * 16392 * 7598 users:(("nscd",580,4)) 2) by code inspection: # grep -F F_UNIX nscd/* nscd/connections.c: sock = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); nscd/connections.c: sock = socket (AF_UNIX, SOCK_STREAM, 0); nscd/connections.c: sock_addr.sun_family = AF_UNIX; nscd/nscd.c: sock = socket (PF_UNIX, SOCK_STREAM, 0); nscd/nscd.c: addr.sun_family = AF_UNIX; nscd/nscd_helper.c: sock = __socket (PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); nscd/nscd_helper.c: sock = __socket (PF_UNIX, SOCK_STREAM, 0); nscd/nscd_helper.c: sun.sun_family = AF_UNIX; > (2) How did you determine that nscd is not inheriting the listening socket from > the parent? 1) by modifying nscd.socket to use stream socket, and observing that the first name lookup (which causes nscd activation) times out, and that afterwards the activated nscd listens on a different socket than systemd 2) by code inspection: nscd unconditionally creates a listening socket regardless of whether it was started the socket passed to it from the parent or not: 532 void 533 nscd_init (void) 534 { ... 850 /* Create the socket. */ 851 #ifndef __ASSUME_SOCK_CLOEXEC 852 sock = -1; 853 if (have_sock_cloexec >= 0) 854 #endif 855 { 856 sock = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); 857 #ifndef __ASSUME_SOCK_CLOEXEC 858 if (have_sock_cloexec == 0) 859 have_sock_cloexec = sock != -1 || errno != EINVAL ? 1 : -1; 860 #endif 861 } 862 #ifndef __ASSUME_SOCK_CLOEXEC 863 if (have_sock_cloexec < 0) 864 sock = socket (AF_UNIX, SOCK_STREAM, 0); 865 #endif 866 if (sock < 0) 867 { 868 dbg_log (_("cannot open socket: %s"), strerror (errno)); 869 exit (errno == EACCES ? 4 : 1); 870 }
This message is a reminder that Fedora 18 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 18. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '18'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 18's end of life. Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 18 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 18's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.