mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
merge from 2.2
This commit is contained in:
parent
e30a3be954
commit
c827787d67
@ -155,6 +155,23 @@ static void read_authfile (
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char* next_command (char** cmdstr)
|
||||||
|
{
|
||||||
|
static pstring command;
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
if (!cmdstr || !(*cmdstr))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
p = strchr(*cmdstr, ';');
|
||||||
|
if (p)
|
||||||
|
*p = '\0';
|
||||||
|
pstrcpy(command, *cmdstr);
|
||||||
|
*cmdstr = p;
|
||||||
|
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
|
||||||
static void get_username (char *username)
|
static void get_username (char *username)
|
||||||
{
|
{
|
||||||
if (getenv("USER"))
|
if (getenv("USER"))
|
||||||
@ -648,18 +665,17 @@ static void usage(char *pname)
|
|||||||
cmd_set++;
|
cmd_set++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do anything specified with -c */
|
/* Do anything specified with -c */
|
||||||
|
if (cmdstr[0]) {
|
||||||
if (cmdstr[0]) {
|
char *cmd;
|
||||||
fstring cmd;
|
char *p = cmdstr;
|
||||||
char *p = cmdstr;
|
|
||||||
|
while((cmd=next_command(&p)) != NULL) {
|
||||||
while(next_token(&p, cmd, ";", sizeof(fstring))) {
|
process_cmd(&cli, cmd);
|
||||||
process_cmd(&cli, cmd);
|
}
|
||||||
}
|
|
||||||
|
return 0;
|
||||||
return 0;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Loop around accepting commands */
|
/* Loop around accepting commands */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user