1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

check for a valid snum when running a printing command

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 980a81651a
commit 381ddb464f

View File

@ -140,6 +140,11 @@ static int print_run_command(int snum,char *command,
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);
if (a1) pstring_sub(syscmd, a1, v1);
if (a2) pstring_sub(syscmd, a2, v2);