diff options
author | Jeremy Allison <jra@samba.org> | 2000-09-06 23:20:35 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-09-06 23:20:35 +0000 |
commit | b27571e9166ebf2254736a9a7a485f24be5b7017 (patch) | |
tree | 873cc10abc2ee9f40d7e327271a38605ceb0f7b3 /source3/printing/nt_printing.c | |
parent | 061fc961cd0f6f10e794402a56b80e0c0039e3b2 (diff) | |
download | samba-b27571e9166ebf2254736a9a7a485f24be5b7017.tar.gz samba-b27571e9166ebf2254736a9a7a485f24be5b7017.tar.bz2 samba-b27571e9166ebf2254736a9a7a485f24be5b7017.zip |
Temporary fix to convert from level6 (Win2k) to level 3 (NT4)
for driver download files.
Jeremy.
(This used to be commit 1c9ac94c941aac5f6d309a094e4f741d523dbfb0)
Diffstat (limited to 'source3/printing/nt_printing.c')
-rw-r--r-- | source3/printing/nt_printing.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 0ad50a2277..f6c85ab3f9 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -429,10 +429,30 @@ void clean_up_driver_struct(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, uint32 } /**************************************************************************** + This function sucks and should be replaced. JRA. +****************************************************************************/ + +static void convert_level_6_to_level3(NT_PRINTER_DRIVER_INFO_LEVEL_3 *dst, NT_PRINTER_DRIVER_INFO_LEVEL_6 *src) +{ + dst->cversion = src->version; + + fstrcpy( dst->name, src->name); + fstrcpy( dst->environment, src->environment); + fstrcpy( dst->driverpath, src->driverpath); + fstrcpy( dst->datafile, src->datafile); + fstrcpy( dst->configfile, src->configfile); + fstrcpy( dst->helpfile, src->helpfile); + fstrcpy( dst->monitorname, src->monitorname); + fstrcpy( dst->defaultdatatype, src->defaultdatatype); + dst->dependentfiles = src->dependentfiles; +} + +/**************************************************************************** ****************************************************************************/ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, uint32 level, struct current_user *user, uint32 *perr) { NT_PRINTER_DRIVER_INFO_LEVEL_3 *driver; + NT_PRINTER_DRIVER_INFO_LEVEL_3 converted_driver; fstring architecture; pstring new_dir; pstring old_name; @@ -453,7 +473,14 @@ BOOL move_driver_to_download_area(NT_PRINTER_DRIVER_INFO_LEVEL driver_abstract, if (level==3) driver=driver_abstract.info_3; - + else if (level==6) { + convert_level_6_to_level3(&converted_driver, driver_abstract.info_6); + driver = &converted_driver; + } else { + DEBUG(0,("move_driver_to_download_area: Unknown info level (%u)\n", (unsigned int)level )); + return False; + } + get_short_archi(architecture, driver->environment); become_root(); |