From 78a4848e8da7bb4f96e99e3419c5473c4c23bb6d Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 10 Jul 2000 05:08:21 +0000 Subject: Re-instated lanman printing security checks (oops). A user can now pause, resume or delete their own job even if they don't have the Manage Documents privilege. Added call to se_access_check() for changing printer properties. The Full Access privilege is required for the user to perform this. Several uninitialised variables and memory leaks plugged. Modified default ACL created on new printers to be Everyone / Print instead of Everyone / Full Access. This required some random stuffing around with the value of the revision field to correspond with the ACL that NT produces when setting the same permission on the printer. Fixed dodgy function call in printing/printfsp.c (This used to be commit 2abce4dcfa351051df6e5f789b34fa99c9b81c22) --- source3/smbd/lanman.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3/smbd/lanman.c') diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 82f0c25fa8..e5a42d4db4 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -1753,6 +1753,7 @@ static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, char *param char *str2 = skip_string(str1,1); char *p = skip_string(str2,1); int jobid, errcode; + extern struct current_user current_user; jobid = SVAL(p,0); @@ -1773,13 +1774,16 @@ static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, char *param switch (function) { case 81: /* delete */ - if (print_job_delete(NULL, jobid)) errcode = NERR_Success; + if (print_job_delete(¤t_user, jobid)) + errcode = NERR_Success; break; case 82: /* pause */ - if (print_job_pause(NULL, jobid)) errcode = NERR_Success; + if (print_job_pause(¤t_user, jobid)) + errcode = NERR_Success; break; case 83: /* resume */ - if (print_job_resume(NULL, jobid)) errcode = NERR_Success; + if (print_job_resume(¤t_user, jobid)) + errcode = NERR_Success; break; } -- cgit