summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss_nt.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-60/+38
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r15975: Only call the printer publishing calls if 'security = ads'Gerald Carter1-1/+7
(prevent a segv) (This used to be commit a2ef525d9e3b4f050cb4e02fad67808d3e916373)
2007-10-10r15334: Fix warning. This table and function not used anymore. Jerry pleaseJeremy Allison1-17/+0
check. Jeremy. (This used to be commit 9f676603aaf84829d52dc8d0e0872a058a4d3d4e)
2007-10-10r15309: normalize printing keys when deletingGerald Carter1-15/+0
(This used to be commit 037f9f831e001a12261419e37c725558dd717af9)
2007-10-10r14788: Fix coverity bug #276. null deref.Jeremy Allison1-1/+17
Jeremy. (This used to be commit 0217f7d7bf4c8b5b7de2433485fb6f78b62ac817)
2007-10-10r14786: Fix coverity #275. null deref.Jeremy Allison1-1/+8
Jeremy. (This used to be commit 363d31c9ec2d2a4429ab4d26b3d7c78b76f60626)
2007-10-10r14482: Fixes for spoolss code (after coverity fixes) when theGerald Carter1-15/+15
client sends a NULL RPC_BUFFER* (This used to be commit 69f816e9f885bdeb6e8c67222b6fdca76d9d1025)
2007-10-10r14387: Try and fix the coverity issues (#53, #54) with negativeJeremy Allison1-1/+1
sink by ensuring all uses of rpcstr_push are consistent with a size_t dest size arg. Jeremy. (This used to be commit f65d7afe1977d9d85046732842f9643716c15088)
2007-10-10r14353: Fix coverity bugs #61 and #62. Remember to divide byJeremy Allison1-25/+20
the size of the data table. Clean up the struct a little. Jeremy. (This used to be commit 338538410d484a9358b60b05a86180275344ffa4)
2007-10-10r14303: Fix coverity #223. In a loop we were forgetting to freeJeremy Allison1-1/+3
resources on error exit path. Jeremy. (This used to be commit f71aa3ab8fdfd08c1bec57b6506ead7c4af7299d)
2007-10-10r14301: Fix coverity #224. In a loop we were forgetting to freeJeremy Allison1-1/+3
resources on error exit path. Jeremy. (This used to be commit f1a5e5aefeeb78512c41cc8fc075b240696a3eb7)
2007-10-10r14299: Fix coverity #225. In a loop we were forgetting to freeJeremy Allison1-3/+6
resources on error exit path. Jeremy. (This used to be commit 1c0b4ed0acdb7fccb148d714796752fefc6dd78c)
2007-10-10r14289: Fix coverity #101, resource leak on error code path.Jeremy Allison1-2/+6
Jeremy. (This used to be commit d9e1d6fed099e7651807aa839a743fc7756ee326)
2007-10-10r14286: Similar clarifiction fix for coverity #102.Jeremy Allison1-8/+10
Jeremy. (This used to be commit f458596b0edd958321c5d4061f034846348a3fe6)
2007-10-10r14284: Fix coverity bug #103. Make code clearer - probablyJeremy Allison1-5/+9
not a real issue but this code is easier to read. Jeremy. (This used to be commit 6621acc68f9a65540330d5c0d07db2488a3e8678)
2007-10-10r14268: Fix coverity error #204. Resource leak on error path.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 5f74e56b865e0bdde0e574cd5f97cf29b06ad155)
2007-10-10r14266: Fix coverity #205. Resource leak on error path.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 23d69758bbff9687ab508e12931a5a49691d7e0d)
2007-10-10r14264: Fix coverity #207. Resource leak on error path.Jeremy Allison1-0/+1
Jeremy. (This used to be commit 0429b6e8c34a99d4b2a9a4849075ef2a5acadf9e)
2007-10-10r14250: Fix coverity bug #107. Resource leak on error path.Jeremy Allison1-1/+3
Jeremy. (This used to be commit ca96c7be778d01594a540917acd3c5c218d6459c)
2007-10-10r14233: Fix Coverity bug # 206Volker Lendecke1-1/+3
(This used to be commit 0dc3030bce7bc7a58c509c70fe503a70db80b62d)
2007-10-10r14178: Clarify code for Coverity #49. Ensure we know weJeremy Allison1-0/+2
can't have an uninitialized *returned val. Jeremy. (This used to be commit e83515afd2cb63b0dfa4f7fe00b6b7163bf35f2f)
2007-10-10r13994: Belt and braces - ensure RPC_BUFFER is valid.Jeremy Allison1-44/+75
Jeremy. (This used to be commit d993797191865878ebfd2ff9028d341017605cd6)
2007-10-10r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison1-35/+20
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-1/+7
(This used to be commit c803e1b2afdfc5bd983f046c976c01adebcfa1ad)
2007-10-10r13829: From the "It's not pretty but it works" categoryGerald Carter1-11/+101
* 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-8/+93
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-10r13821: replacing some strings with macrosGerald Carter1-9/+11
(This used to be commit a34ab5c827630a5517e4c706877a172e6063f227)
2007-10-10r13820: * Start fleshing out the XcvDataPort() server implementationGerald Carter1-36/+99
* Add support for the "Local Port" monitor as well through this API (This used to be commit ba9cdd88a0abf90a9c04959e554d7e4f10d17ff7)
2007-10-10r13815: "Into the blind world let us now descend,"Gerald Carter1-91/+58
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-10r13547: add earlier checks to deny deleting a printer driver. The previousGerald Carter1-0/+24
code relied upon file permissions alone. Now we check that the user is a printer administrator and that the share has not been marked read only for that user. (This used to be commit 117d9fd9e16a7afbc6772506a4f8c33ff99d33f7)
2007-10-10r13316: Let the carnage begin....Gerald Carter1-7/+13
Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
2007-10-10r13293: Rather a big patch I'm afraid, but this should fix bug #3347Jeremy Allison1-6/+6
by saving the UNIX token used to set a delete on close flag, and using it when doing the delete. libsmbsharemodes.so still needs updating to cope with this change. Samba4 torture tests to follow. Jeremy. (This used to be commit 23f16cbc2e8cde97c486831e26bcafd4ab4a9654)
2007-10-10r12043: It's amazing the warnings you find when compiling on a 64-bitJeremy Allison1-1/+1
box with gcc4 and -O6... Fix a bunch of C99 dereferencing type-punned pointer will break strict-aliasing rules errors. Also added prs_int32 (not uint32...) as it's needed in one place. Find places where prs_uint32 was being used to marshall/unmarshall a time_t (a big no no on 64-bits). More warning fixes to come. Thanks to Volker for nudging me to compile like this. Jeremy. (This used to be commit c65b752604f8f58abc4e7ae8514dc2c7f086271c)
2007-10-10r11860: BUG 3156: don't use find_service() when explicitly looking for a ↵Gerald Carter1-14/+16
printer as the username map might get in the way (This used to be commit 46bf28c81c27dfdc412318a83bf565211a58a47d)
2007-10-10r11240: * fix invalid read reported by valgrind in theGerald Carter1-68/+34
spoolss backchannel connection by rewriting spoolss_connect_to_client(). Ensure that we save the cli_state* in the rpc_pipe_client struct. * fix typo in debug message in cli_start_connection" (This used to be commit 18400f96628ffdd332c2fb2aa52b5e9aee5cb3ce)
2007-10-10r11235: fix segfault in addprinter due to mixing talloc() and malloc()'d memoryGerald Carter1-3/+1
(This used to be commit f6f78877b485be5efd5cf1f3147b2e9fee647e52)
2007-10-10r11135: should fix seg fault in addprinter code reported by Marcin. ↵Gerald Carter1-6/+15
Allocate memory in convert_printer_info() if necessary (This used to be commit 7ada5da8e94a08a9a3e488172fa04ce688882299)
2007-10-10r10656: BIG merge from trunk. Features not copied overGerald Carter1-26/+29
* \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10r9945: fix typos.Günther Deschner1-1/+1
Guenther (This used to be commit 12029e902277053a4066eae1b3ae311fae5e6422)
2007-10-10r9752: figured out why talloc_steal() is a bad idea for SEC_DESC*Gerald Carter1-2/+10
Add a comment so someone else doesn't get bitten by this as well. (This used to be commit 050364ef34b1e69260bd9df9e2140c45263e92f5)
2007-10-10r9739: conver the reg_objects (REGSUBKEY_CTR & REGVAL_CTR) to useGerald Carter1-129/+38
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-10r9264: fix valgrind invalid write error in enumprinterdata()Gerald Carter1-2/+3
(This used to be commit bfebbc86fc0f90e580888da25006d8e5e50b6304)
2007-10-10r9021: Fix smbd-crash bug in openprinter (found by samba4 smbtortureGünther Deschner1-4/+10
RPC-SPOOLSS). Guenther (This used to be commit 06bfe789d54a12dfa3c46e9777f96ff7e162a9db)
2007-10-10r8916: should fix the valgrind invalid read of size 1 ontheGerald Carter1-8/+8
GetPrinterData("OSVersion") abartlet saw when browsing from Vista client. (This used to be commit b527b86ae80ebc0b6e7318ed31d44be985aa9af0)
2007-10-10r8617: Be very explicit if addprinterex is called that the "addprinter command"Jeremy Allison1-2/+7
must be defined in smb.conf. Jeremy. (This used to be commit 86f8368c997f0eece20724a0a7158832c66da9f7)
2007-10-10r8501: * disable printer handle object cache (was mostly usedGerald Carter1-0/+5
for NT4 clients enumerating printer data on slow CPUs) * fix pinter and secdesc record upgrade to normalize the key (rev'd printer tdb version) * fixed problem that was normalizing the printername name field in general, this should fix the issues upgrading print servers from 3.0.14a to 3.0.20 (This used to be commit d07179de2f2a6eb1d13d0e25ac10de1a21475559)
2007-10-10r8326: factor out the delete printer code to a delete_printer_hook() for reuseGerald Carter1-56/+53
(This used to be commit 0689851a90fbd91ff30f6e2afc05d141f6ce082d)
2007-10-10r8324: * initial cut at creating printers via the registry APIGerald Carter1-3/+4
Need to add delete_key support (This used to be commit 9a27f7181adca10f60c47d342a51dec34321e12b)
2007-10-10r8322: * get RegSetValue() working for printer subkey valuesGerald Carter1-1/+1
(not immediate values below the <printer name> key yet. (This used to be commit a872ea5f0e29f7b585574a56b52a5eb44cb92278)
2007-10-10r8066: * had to modify the printer data storage slightly in ntprinters.tdbGerald Carter1-1/+1
when packing values. It is a compatible change though and will not require a tdb version upgrade * Can successfully create new printer subkeys via winreg that are immediately available via spoolss calls. Still cannot delete keys yet though. That comes next. (This used to be commit 00bce2b3bb78a44842a258b1737076281297d247)