mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
Merge from HEAD.
- null termination of winbind request fix - bail out if we can't open winbind socket (This used to be commit 102e490d683c0758a9798a3c15e748509690c95b)
This commit is contained in:
parent
71647364a0
commit
f1fc17ea37
@ -362,7 +362,7 @@ void winbind_process_packet(struct winbindd_cli_state *state)
|
|||||||
/* Process request */
|
/* Process request */
|
||||||
|
|
||||||
/* Ensure null termination of entire 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;
|
state->pid = state->request.pid;
|
||||||
|
|
||||||
@ -519,6 +519,12 @@ static void process_loop(void)
|
|||||||
/* Initialise fd lists for select() */
|
/* Initialise fd lists for select() */
|
||||||
|
|
||||||
listen_sock = open_winbindd_socket();
|
listen_sock = open_winbindd_socket();
|
||||||
|
|
||||||
|
if (listen_sock == -1) {
|
||||||
|
perror("open_winbind_socket");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
maxfd = listen_sock;
|
maxfd = listen_sock;
|
||||||
|
|
||||||
FD_ZERO(&r_fds);
|
FD_ZERO(&r_fds);
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
/* Update this when you change the interface. */
|
/* Update this when you change the interface. */
|
||||||
|
|
||||||
#define WINBIND_INTERFACE_VERSION 5
|
#define WINBIND_INTERFACE_VERSION 6
|
||||||
|
|
||||||
/* Socket commands */
|
/* Socket commands */
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ struct winbindd_request {
|
|||||||
} name;
|
} name;
|
||||||
uint32 num_entries; /* getpwent, getgrent */
|
uint32 num_entries; /* getpwent, getgrent */
|
||||||
} data;
|
} data;
|
||||||
fstring domain; /* {set,get,end}{pw,gr}ent() */
|
char null_term;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Response values */
|
/* Response values */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user