mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
check for a valid snum when running a printing command
This commit is contained in:
parent
980a81651a
commit
381ddb464f
@ -140,6 +140,11 @@ static int print_run_command(int snum,char *command,
|
|||||||
|
|
||||||
if (!command || !*command) return -1;
|
if (!command || !*command) return -1;
|
||||||
|
|
||||||
|
if (!VALID_SNUM(snum)) {
|
||||||
|
DEBUG(0,("Invalid snum %d for command %s\n", snum, command));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
pstrcpy(syscmd, command);
|
pstrcpy(syscmd, command);
|
||||||
if (a1) pstring_sub(syscmd, a1, v1);
|
if (a1) pstring_sub(syscmd, a1, v1);
|
||||||
if (a2) pstring_sub(syscmd, a2, v2);
|
if (a2) pstring_sub(syscmd, a2, v2);
|
||||||
|
Loading…
Reference in New Issue
Block a user