diff options
author | Gerald Carter <jerry@samba.org> | 2006-02-17 21:07:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:12 -0500 |
commit | 117d9fd9e16a7afbc6772506a4f8c33ff99d33f7 (patch) | |
tree | cde39aac73b5b3e631d93b08d015ae0d027e9fed /source/printing | |
parent | 380d89d148548b4658f705e900d874094a123359 (diff) | |
download | samba-117d9fd9e16a7afbc6772506a4f8c33ff99d33f7.tar.gz samba-117d9fd9e16a7afbc6772506a4f8c33ff99d33f7.tar.xz samba-117d9fd9e16a7afbc6772506a4f8c33ff99d33f7.zip |
r13547: add earlier checks to deny deleting a printer driver. The previous
code relied upon file permissions alone. Now we check that
the user is a printer administrator and that the share has not been
marked read only for that user.
Diffstat (limited to 'source/printing')
-rw-r--r-- | source/printing/nt_printing.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index e6c6f7d3dc8..becd51cd7eb 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -4783,6 +4783,11 @@ static BOOL delete_driver_files( NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3, struct return False; } + if ( !CAN_WRITE(conn) ) { + DEBUG(3,("delete_driver_files: Cannot delete print driver when [print$] is read-only\n")); + return False; + } + /* Save who we are - we are temporarily becoming the connection user. */ if ( !become_user(conn, conn->vuid) ) { |