diff options
author | Tim Potter <tpot@samba.org> | 2002-12-20 01:25:27 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-12-20 01:25:27 +0000 |
commit | f1fc17ea37e41cca3aacffaac43e6b8c39e95d58 (patch) | |
tree | c67993fc198f77bf6b743a571c324bd3aa76a613 /source3/nsswitch/winbindd.c | |
parent | 71647364a03eb2014bdcee0c99974ec019cf287d (diff) | |
download | samba-f1fc17ea37e41cca3aacffaac43e6b8c39e95d58.tar.gz samba-f1fc17ea37e41cca3aacffaac43e6b8c39e95d58.tar.xz samba-f1fc17ea37e41cca3aacffaac43e6b8c39e95d58.zip |
Merge from HEAD.
- null termination of winbind request fix
- bail out if we can't open winbind socket
(This used to be commit 102e490d683c0758a9798a3c15e748509690c95b)
Diffstat (limited to 'source3/nsswitch/winbindd.c')
-rw-r--r-- | source3/nsswitch/winbindd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index 4bfec1afe49..24d08a4e88e 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -362,7 +362,7 @@ void winbind_process_packet(struct winbindd_cli_state *state) /* Process request */ /* Ensure null termination of entire request */ - state->request.domain[sizeof(state->request.domain)-1]='\0'; + state->request.null_term = '\0'; state->pid = state->request.pid; @@ -519,6 +519,12 @@ static void process_loop(void) /* Initialise fd lists for select() */ listen_sock = open_winbindd_socket(); + + if (listen_sock == -1) { + perror("open_winbind_socket"); + exit(1); + } + maxfd = listen_sock; FD_ZERO(&r_fds); |