summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-09-13 02:24:35 +0000
committerJeremy Allison <jra@samba.org>2000-09-13 02:24:35 +0000
commitc1d25bdb0cb4ad414a533b0a8fb66b6968baa83e (patch)
tree015fe56b502d678991af62a8932d903f0d56f00e
parent6ab4544738ed91e1d9f88a2791c1799333f64dae (diff)
downloadsamba-c1d25bdb0cb4ad414a533b0a8fb66b6968baa83e.tar.gz
samba-c1d25bdb0cb4ad414a533b0a8fb66b6968baa83e.tar.bz2
samba-c1d25bdb0cb4ad414a533b0a8fb66b6968baa83e.zip
Added time check test before allowing print job.
Jeremy. (This used to be commit 0249de4cd91d72efb344e9fb05e2be2cb3f03945)
-rw-r--r--source3/printing/nt_printing.c7
-rw-r--r--source3/printing/printing.c7
2 files changed, 13 insertions, 1 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index a7ca487d00..734cf7f8a8 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -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;
}
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 406cbf2c80..70917b214e 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -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;
}