mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
make sure the printer data value exists before saying you deleted it
(This used to be commit 017133ea0c3eb0579710727379585df2b585614d)
This commit is contained in:
parent
f474b7fb4e
commit
14eb5f108e
@ -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 );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user