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

Added time check test before allowing print job.

Jeremy.
This commit is contained in:
Jeremy Allison 0001-01-01 00:00:00 +00:00
parent 318ead783c
commit 0249de4cd9
2 changed files with 13 additions and 1 deletions

View File

@ -1928,7 +1928,11 @@ BOOL get_specific_param(NT_PRINTER_INFO_LEVEL printer, uint32 level,
while (param != NULL)
{
#if 1 /* JRA - I think this should be case insensitive.... */
if ( strequal(value, param->value)
#else
if ( !strcmp(value, param->value)
#endif
&& strlen(value)==strlen(param->value))
break;
@ -2418,6 +2422,9 @@ BOOL print_time_access_check(int snum)
free_a_printer(&printer, 2);
if (!ok)
errno = EACCES;
return ok;
}

View File

@ -625,7 +625,12 @@ int print_job_start(struct current_user *user, int snum, char *jobname)
errno = 0;
if (!print_access_check(user, snum, PRINTER_ACCESS_USE)) {
DEBUG(3, ("job start denied by security descriptor\n"));
DEBUG(3, ("print_job_start: job start denied by security descriptor\n"));
return -1;
}
if (!print_time_access_check(snum)) {
DEBUG(3, ("print_job_start: job start denied by time check\n"));
return -1;
}