1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

check for a valid snum when running a printing command

(This used to be commit 381ddb464f)
This commit is contained in:
Andrew Tridgell 2000-04-23 08:13:12 +00:00
parent a32420e5b7
commit 31446a98a3

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);