1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-14 20:23:54 +03:00

- The printers are indexed by the sharename in both get_a_printer() and

add_a_printer() now.

- correctly unpack the private part of a devmode and remove a memleak

- correctly retrieve the pair(value,data) for getprinterdata

- handle null devicemode in printer_info_2

I still have some bugs but I'm not crashing anymore NT4SP6 d/c build :-)


        J.F.
This commit is contained in:
Jean-François Micouleau
-
parent d8656304d5
commit 493f7d11ac
3 changed files with 41 additions and 21 deletions

View File

@@ -1575,6 +1575,15 @@ static BOOL new_smb_io_reldevmode(char *desc, NEW_BUFFER *buffer, int depth, DEV
uint32 struct_offset = prs_offset(ps);
uint32 relative_offset;
if (*devmode == NULL) {
relative_offset=0;
if (!prs_uint32("offset", ps, depth, &relative_offset))
return False;
DEBUG(8, ("boing, the devmode was NULL\n"));
return True;
}
buffer->string_at_end -= ((*devmode)->size + (*devmode)->driverextra);
if(!prs_set_offset(ps, buffer->string_at_end))