diff options
author | Gerald Carter <jerry@samba.org> | 2003-08-25 13:05:48 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-08-25 13:05:48 +0000 |
commit | 14eb5f108e13e598bff0396c39af4a7a820c74e9 (patch) | |
tree | 90365e99ded6a632277fb1f4485a20e22d6df1d3 /source3 | |
parent | f474b7fb4e24b790a64178b044e6a8f7caab9a95 (diff) | |
download | samba-14eb5f108e13e598bff0396c39af4a7a820c74e9.tar.gz samba-14eb5f108e13e598bff0396c39af4a7a820c74e9.tar.bz2 samba-14eb5f108e13e598bff0396c39af4a7a820c74e9.zip |
make sure the printer data value exists before saying you deleted it
(This used to be commit 017133ea0c3eb0579710727379585df2b585614d)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/printing/nt_printing.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 294b9c9018..b4a551c161 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2897,6 +2897,11 @@ WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, const char *key, const key_index = lookup_printerkey( &p2->data, key ); if ( key_index == -1 ) return WERR_OK; + + /* make sure the value exists so we can return the correct error code */ + + if ( !regval_ctr_getvalue( &p2->data.keys[key_index].values, value ) ) + return WERR_BADFILE; regval_ctr_delvalue( &p2->data.keys[key_index].values, value ); |