summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_spoolss.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r23801: The FSF has moved around a lot. This fixes their Mass Ave address.Andrew Tridgell1-2/+1
(This used to be commit 87c91e4362c51819032bfbebbb273c52e203b227)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r23122: Fix bug #4655. We marshall the enumdataex correctly,Jeremy Allison1-17/+48
but W2K3 doesn't follow our rules when sending data to us. Ensure we look for the data at the correct offsets when reading the data. Too late for 3.0.25a - don't merge. Jeremy. (This used to be commit a871191395eef6ed76f9e7666fd1c0fde3105984)
2007-10-10r23080: Fix bug #4637 - we hads missed some cases whereJeremy Allison1-15/+19
we were calling PRS_ALLOC_MEM with zero count. Jeremy. (This used to be commit 9a10736e6fa276ca4b0726fbb7baf0daafbdc46d)
2007-10-10r22852: merge fixes for CVE-2007-2446 and CVE-2007-2447 to all branchesGerald Carter1-0/+4
(This used to be commit f65214be68c1a59d9598bfb9f3b19e71cc3fa07b)
2007-10-10r22588: Make all uses of TALLOC_MEMDUP consistent.Jeremy Allison1-3/+7
Jeremy. (This used to be commit 8ad13718af0ba1fcb10a6f1631b1ed3cb8d11175)
2007-10-10r22062: Fix the parsing of info level 3. Flags is not a flagsJeremy Allison1-5/+38
field, but an offset. Fixed 64-bit display of ACLs on printers. Jeremy. (This used to be commit 0c8949ff5d742dbe59f2af0f57a289f238e3592c)
2007-10-10r21346: FIXME ! Our parsing here is wrong I think,Jeremy Allison1-1/+10
but for a level3 it makes no sense for ptr_sec_desc to be NULL. JRA. Based on a Vista sniff from Martin Zielinski <mz@seh.de>. Jerry - part of the Vista patchset. Jeremy. (This used to be commit 60e26a9039fbe0fd632e306bf545331195fb1ce6)
2007-10-10r21096: Fix formatting.Jeremy Allison1-2/+2
Jeremy (This used to be commit b35fa5168eafd536976fae29d61ac97a3752ab54)
2007-10-10r19028: Implement getprinterinfo level 6 (only the status) and get rid of ↵Volker Lendecke1-0/+31
snum in the getprinter calls. Survives the RPC-SAMBA3-SPOOLSS test which I will activate when the Samba4 build farm has picked it up. Volker (This used to be commit d7248b6cfa4d6e639d92afdd092136d900d90e19)
2007-10-10r18745: Use the Samba4 data structures for security descriptors and security ↵Jelmer Vernooij1-8/+4
descriptor buffers. Make security access masks simply a uint32 rather than a structure with a uint32 in it. (This used to be commit b41c52b9db5fc4a553b20a7a5a051a4afced9366)
2007-10-10r18188: merge 3.0-libndr branchJelmer Vernooij1-3/+1
(This used to be commit 1115745caed3093c25d6be01ffee21819fb0a675)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-1/+1
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r16378: Klocwork #1079. Allow BUFFER5 to cope with a NULLJeremy Allison1-34/+38
dependentfiles pointer. Jeremy. (This used to be commit 05c50d99a4b1d2bc11a83e07902082227d7c074a)
2007-10-10r16377: Klocwork #1077.Jeremy Allison1-1/+6
Jeremy. (This used to be commit 72709a8465caf5b7d95911250234f203b0ff4675)
2007-10-10r14778: Fix coverity null deref bugs #268 - #271.Jeremy Allison1-1/+24
Jeremy. (This used to be commit 0a1ccfefcf27c5970b82bf8a451bcdaa4fee1bd0)
2007-10-10r14298: The other half of Coverity # 217Volker Lendecke1-1/+1
(This used to be commit b9fb3fc0e3708b4721aaa1dcb7756d3774fb8db8)
2007-10-10r14232: Fix Coverity Bug # 218Volker Lendecke1-1/+1
(This used to be commit 932d769a32748695cfff4c761422feb2ef15acbb)
2007-10-10r14228: Fix Coverity bug # 217Volker Lendecke1-1/+1
(This used to be commit 680bd1b004f26b5a0449114911c85ca587038147)
2007-10-10r14083: Fix coverity bug #19. Don't deref possible NULL.Jeremy Allison1-1/+1
Jeremy. (This used to be commit fc8e1e5c02dd950ed1f8656a5d7ab47fa7ec1ea7)
2007-10-10r14080: Fix Coverity bug #18. Ensure non-null before ref.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 617c5805e59dd601b8841251032e3db4d6a64621)
2007-10-10r14047: Coverity fix #17. Ensure srv_name and info cannotJeremy Allison1-0/+4
be zero before deref. Jeremy. (This used to be commit fbf9db6624d9584a26ae302df3c76555bbd2bb1e)
2007-10-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison1-5/+3
realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy. (This used to be commit 1d710d06a214f3f1740e80e0bffd6aab44aac2b0)
2007-10-10r13878: move PORT_DATA_1 to use static sized UNICODE strings as per MSDNGerald Carter1-23/+12
(This used to be commit c803e1b2afdfc5bd983f046c976c01adebcfa1ad)
2007-10-10r13841: Fix an uninitialized variable warning.Volker Lendecke1-1/+1
Jerry, this just fixes the warning. This routine does not seem to cope well with !UNMARSHALLING. You might want to look... Volker (This used to be commit 2c0c40dfb5da9e901e099295f43032a745e71253)
2007-10-10r13829: From the "It's not pretty but it works" categoryGerald Carter1-0/+100
* Finish prototype of the "add port command" implementation Format is "addportcommand portname deviceURI" * DeviceURI is either - socket://hostname:port/ - lpr://hostname/queue depending on what the client sent in the request (This used to be commit 6d74de7a676b71e83a3c3714743e6380c04e4425)
2007-10-10r13824: * add api table for Xcv TCPMON and LOCALMON calls startingGerald Carter1-5/+23
with the "MonitorUI" call * Fix some parsing errors This gets us to the Add Port Wizard dialog. (This used to be commit a444aa7f0088fb71ff89df8c280209188b33ec3d)
2007-10-10r13815: "Into the blind world let us now descend,"Gerald Carter1-0/+64
Began the poet, his face as pale as death. "I will go first, and you will follow me." --- Adding XcvDataPort() to the spoolss code for remotely add ports. The design is to allow an intuitive means of creating a new CUPS print queue from the Windows 2000/XP APW without hacks like specifying the deviceURI in the location field of the printer properties dialog. Also set 'default devmode = yes' as the new default since it causes no harm and only is executed when you have a NULL devmode anyways. (This used to be commit 123e478ce5b5f63a61d00197332b847e83722468)
2007-10-10r9739: conver the reg_objects (REGSUBKEY_CTR & REGVAL_CTR) to useGerald Carter1-23/+1
the new talloc() features: Note that the REGSUB_CTR and REGVAL_CTR objects *must* be talloc()'d since the methods use the object pointer as the talloc context for internal private data. There is no longer a regXXX_ctr_intit() and regXXX_ctr_destroy() pair of functions. Simply TALLOC_ZERO_P() and TALLOC_FREE() the object. Also had to convert the printer_info_2->NT_PRINTER_DATA field to be talloc()'d as well. This is just a stop on the road to cleaning up the printer memory management. (This used to be commit ef721333ab9639cb5346067497e99fbd0d4425dd)
2007-10-10r9086: * fix invalid read in parse_spoolss when writing a devmode toGerald Carter1-6/+24
the wire * fix dup_a_regval() when size is 0 * ensure we pass a pstring to unlink_internals (fixes delete_driver code) (This used to be commit 353e63ff421c564a1b7c7cfe95982f31c871a227)
2007-10-10r8507: BUG 2557: don't give and rpc fault when you get an unsupported ↵Gerald Carter1-0/+16
SetPrinter() level (This used to be commit f617ca33f45fbc779356c52664c1e689114accdd)
2007-10-10r8398: Fix segfault in the client addprinterex-call. Found with "net rpcGünther Deschner1-1/+2
printer"-functions. Thanks to Thomas Di Naro (Novell) for the detailed debug-logs. Guenther (This used to be commit b532553b064f1e9893b39dda903d458055c11f86)
2007-10-10r7882: Looks like a large patch - but what it actually does is make SambaJeremy Allison1-8/+8
safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy (This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
2007-10-10r6683: remove log messages about unknown specversions since I think we are ↵Gerald Carter1-19/+0
fairly safe at this point (This used to be commit 6eaefa1a9a47421e20e346c652c31fd524db8878)
2007-10-10r6491: BUG 2653: patch from Olaf Imig <Olaf.Imig@bifab.de>; allocate memory ↵Gerald Carter1-1/+2
for user1* in make_spoolss_q_open_printer_ex() (This used to be commit f04232cce7f940814828caf80a2ecb8761146b14)
2007-10-10r6014: rather large change set....Gerald Carter1-68/+67
pulling back all recent rpc changes from trunk into 3.0. I've tested a compile and so don't think I've missed any files. But if so, just mail me and I'll clean backup in a couple of hours. Changes include \winreg, \eventlog, \svcctl, and general parse_misc.c updates. I am planning on bracketing the event code with an #ifdef ENABLE_EVENTLOG until I finish merging Marcin's changes (very soon). (This used to be commit 4e0ac63c36527cd8c52ef720cae17e84f67e7221)
2007-10-10r5946: BUG 2497: fix bug in rpcclient's deletedriverex when asking to delete ↵Gerald Carter1-1/+1
all versions of a driver (This used to be commit 1f0060278609a194b76872367530d2f7bcea7fa7)
2007-10-10r5805: merging spoolss parsing changes from trunk and cleaning up resulting ↵Gerald Carter1-487/+67
segvs (This used to be commit 25121547caaaed0d60f4db7458570c14e7d21b2a)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-54/+51
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r3645: Allow deldriverex in rpcclient to delete drivers for a specificGünther Deschner1-2/+8
architecture and a specific version. Guenther (This used to be commit a24df09386f177e625fb99c975896cbe7a594b4b)
2007-10-10r3639: patch from Martin Zielinski <mz@seh.de> to add DeleteDriverEx() ↵Gerald Carter1-0/+24
function to rpcclient (This used to be commit cfd51c02447f7b42cffcaf4cc6179237d58c8229)
2007-10-10r2476: now that PRINTER_ATTRIBUTE_PUBLISHED does not get reset anymore, migrateGünther Deschner1-0/+30
the publishing-state for migrated printers as well. Therefor added client-side-support for setprinter level 7. Next will be a "net rpc printer publish"-command (just for completeness). Guenther (This used to be commit 224920738fdc65ef170152062177421cfed85bbf)
2007-10-10r1692: first commit :)Günther Deschner1-1/+37
* add IA64 to the architecture table of printer-drivers * add new "net"-subcommands: net rpc printer migrate {drivers|printers|forms|security|settings|all} [printer] net rpc share migrate {shares|files|all} [share] this is the first part of the migration suite. this will will (once feature-complete) allow to do 1:1 server-cloning in the best possible way by making heavy use of samba's rpc_client-functions. all migration-steps are implemented as rpc/smb-client-calls; net communicates via rpc/smb with two servers at the same time (a remote, source server and a destination server that currently defaults to the local smbd). this allows e. g. printer-driver migration including driverfiles, recursive mirroring of file-shares including file-acls, etc. almost any migration step can be called with a migrate-subcommand to provide more flexibility during a migration process (at the cost of quite some redundancy :) ). "net rpc printer migrate settings" is still in a bad condition (many open questions that hopefully can be adressed soon). "net rpc share migrate security" as an isolated call to just migrate share-ACLs will be added later. Before playing with it, make sure to use a test-server. Migration is a serious business and this tool-set can perfectly overwrite your existing file/print-shares. * along with the migration functions had to make I the following changes: - implement setprinter level 3 client-side - implement net_add_share level 502 client-side - allow security descriptor to be set in setprinterdata level 2 serverside guenther (This used to be commit 8f1716a29b7e85baf738bc14df7dabf03762f723)
2004-03-24fixes for prnadmin.dll APIGerald Carter1-1/+1
* force the PRINTER_ATTRIBUTE_LOCAL (nor PRINTER_ATTRIBUTE_NETWORK) * ensure that we return the sec_desc in smb_io_printer_info_2 (allows prnui.dll to restore security descriptors from a data file). (This used to be commit c335cb80d2e4c687279b7a6038a97518770ccae9)
2003-11-13* Fix from SATOH Fumiyasu for bug 660 (failing to view printGerald Carter1-5/+7
jobs) by only enforce the 'max reported print jobs' parameter when it is non-zero. * Fixed bug 338 by making sure that data values are written out when we are marshalling an EnumPrinterDataEx() reply. This probably fixes other bugs reported against point-n-print feature in 3.0.0 (This used to be commit fd98af75d655449a677360f6991da5caabc88b4d)
2003-09-25Fix for #480. Change the interface for init_unistr2 to not take a lengthJeremy Allison1-45/+34
but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string. This is not the case. Count it after conversion. Jeremy. (This used to be commit f82c273a42f930c7152cfab84394781744815e0e)
2003-08-15get rid of some sompiler warnings on IRIXHerb Lewis1-5/+5
(This used to be commit a6a39c61e8228c8b3b7552ab3c61ec3a6a639143)
2003-07-14Don't bomb out when trying to unmarshall a zero length printerdata value.Tim Potter1-4/+3
Fixes remote printer publishing of shared printers from a Samba server. (This used to be commit 7f363fa32d3b660567fc87d5d0b1e1d4dd58461a)
2003-06-23fix bug #178; available space in devmode should be intGerald Carter1-1/+1
(This used to be commit 944480b89a829f159cabff100d83a72400aa6b6c)
2003-04-28Whitespace syncup.Tim Potter1-2/+1
(This used to be commit 7fd7af121ee8ba4f9540394f64fe3c78e2e96cd2)