"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/responder/common/responder_common.c" between
sssd-2.4.1.tar.gz and sssd-2.4.2.tar.gz

About: SSSD is a system daemon to manage identity, authentication and authorization for centrally-managed systems. It provides several interfaces, including NSS and PAM modules or a D-Bus interface.

responder_common.c  (sssd-2.4.1):responder_common.c  (sssd-2.4.2)
skipping to change at line 1006 skipping to change at line 1006
if (rctx->priv_lfd >= 0) close(rctx->priv_lfd); if (rctx->priv_lfd >= 0) close(rctx->priv_lfd);
return EIO; return EIO;
} }
int activate_unix_sockets(struct resp_ctx *rctx, int activate_unix_sockets(struct resp_ctx *rctx,
connection_setup_t conn_setup) connection_setup_t conn_setup)
{ {
int ret; int ret;
#ifdef HAVE_SYSTEMD #ifdef HAVE_SYSTEMD
struct sockaddr_un sockaddr;
socklen_t sockaddr_len = sizeof(sockaddr);
if (rctx->lfd == -1 && rctx->priv_lfd == -1) { if (rctx->lfd == -1 && rctx->priv_lfd == -1) {
int numfds = (rctx->sock_name ? 1 : 0) int numfds = (rctx->sock_name ? 1 : 0)
+ (rctx->priv_sock_name ? 1 : 0); + (rctx->priv_sock_name ? 1 : 0);
/* but if systemd support is available, check if the sockets /* but if systemd support is available, check if the sockets
* have been opened for us, via socket activation */ * have been opened for us, via socket activation */
ret = sd_listen_fds(1); ret = sd_listen_fds(1);
if (ret < 0) { if (ret < 0) {
DEBUG(SSSDBG_MINOR_FAILURE, DEBUG(SSSDBG_MINOR_FAILURE,
"Unexpected error probing for active sockets. " "Unexpected error probing for active sockets. "
"Will proceed with no sockets. [Error %d (%s)]\n", "Will proceed with no sockets. [Error %d (%s)]\n",
skipping to change at line 1035 skipping to change at line 1038
if (ret == numfds) { if (ret == numfds) {
rctx->lfd = SD_LISTEN_FDS_START; rctx->lfd = SD_LISTEN_FDS_START;
ret = sd_is_socket_unix(rctx->lfd, SOCK_STREAM, 1, NULL, 0); ret = sd_is_socket_unix(rctx->lfd, SOCK_STREAM, 1, NULL, 0);
if (ret < 0) { if (ret < 0) {
DEBUG(SSSDBG_CRIT_FAILURE, DEBUG(SSSDBG_CRIT_FAILURE,
"Activated socket is not a UNIX listening socket\n"); "Activated socket is not a UNIX listening socket\n");
ret = EIO; ret = EIO;
goto done; goto done;
} }
ret = getsockname(rctx->lfd, (struct sockaddr *) &sockaddr, &sockadd
r_len);
if (ret == EOK) {
if (memcmp(rctx->sock_name, sockaddr.sun_path, strlen(rctx->sock
_name)) != 0) {
DEBUG(SSSDBG_CONF_SETTINGS,
"Warning: socket path defined in systemd unit (%s) and
sssd.conf (%s) don't match\n",
sockaddr.sun_path, rctx->sock_name);
}
}
ret = sss_fd_nonblocking(rctx->lfd); ret = sss_fd_nonblocking(rctx->lfd);
if (ret != EOK) goto done; if (ret != EOK) goto done;
if (numfds == 2) { if (numfds == 2) {
rctx->priv_lfd = SD_LISTEN_FDS_START + 1; rctx->priv_lfd = SD_LISTEN_FDS_START + 1;
ret = sd_is_socket_unix(rctx->priv_lfd, SOCK_STREAM, 1, NULL, 0) ; ret = sd_is_socket_unix(rctx->priv_lfd, SOCK_STREAM, 1, NULL, 0) ;
if (ret < 0) { if (ret < 0) {
DEBUG(SSSDBG_CRIT_FAILURE, DEBUG(SSSDBG_CRIT_FAILURE,
"Activated priv socket is not a UNIX listening socket\ n"); "Activated priv socket is not a UNIX listening socket\ n");
ret = EIO; ret = EIO;
goto done; goto done;
 End of changes. 2 change blocks. 
0 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)