r21933: Change the write_sock() call in pam_winbind_request()
authorGerald Carter <jerry@samba.org>
Thu, 22 Mar 2007 18:09:21 +0000 (18:09 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:18:50 +0000 (12:18 -0500)
to not request a privileged pipe operation for everything
as this cannot be done from a process running under the
context of a user (e.g. screensaver).

Thanks to Danilo Almeida <dalmeida@centeris.com> for the help
in pointing out the change to write_sock().

source/nsswitch/pam_winbind.c

index 66f9a0931443e124e09872ce3584721e8543e866..9d52dc89d0adef1f364519a59edd438c1e3866c1 100644 (file)
@@ -436,7 +436,7 @@ static int pam_winbind_request(pam_handle_t * pamh, int ctrl,
        /* Fill in request and send down pipe */
        init_request(request, req_type);
        
-       if (write_sock(request, sizeof(*request), 0, 1) == -1) {
+       if (write_sock(request, sizeof(*request), 0, 0) == -1) {
                _pam_log(pamh, ctrl, LOG_ERR, "pam_winbind_request: write to socket failed!");
                close_sock();
                return PAM_SERVICE_ERR;