summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss_nt.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r19156: Make enumprinters use the share iterators.Volker Lendecke1-25/+29
Volker (This used to be commit 9b1759617ce7841a78d9f792254a9e4fa814858f)
2007-10-10r19154: Trivial logic simplification: Get rid of two indentation levels. ↵Volker Lendecke1-32/+51
Survives the consistency checks just checked into Samba4. Volker (This used to be commit c48bb4b37b32fac9d01d243290532641d3701ec7)
2007-10-10r19028: Implement getprinterinfo level 6 (only the status) and get rid of ↵Volker Lendecke1-80/+214
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-10r18898: Fix for bug #4100 from Udo Eberhardt <udo.eberhardt@thesycon.de>.Jeremy Allison1-0/+3
Ensure we initialize values for smb_io_notify_info_data_strings to fix crash. Jeremy. (This used to be commit ceefb8dd3ca67449d5afbf556e9879abb37830ac)
2007-10-10r18745: Use the Samba4 data structures for security descriptors and security ↵Jelmer Vernooij1-13/+13
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-10r18654: Rename "struct uuid" => "struct GUID" for consistency.Jelmer Vernooij1-1/+1
(This used to be commit 5de76767e857e9d159ea46e2ded612ccd6d6bf19)
2007-10-10r18404: * swap from POLICY_HND to the struct policy_handle from ndr/misc.hGerald Carter1-4/+0
* move OUR_HANDLE macro to include/rpc_misc.h (This used to be commit 2b37079af2f569df7a58878150a61980c6fe06ee)
2007-10-10r18188: merge 3.0-libndr branchJelmer Vernooij1-2/+1
(This used to be commit 1115745caed3093c25d6be01ffee21819fb0a675)
2007-10-10r17386: fix inverted logic pointed out by Volker. When deleting a printer ↵Gerald Carter1-1/+1
return access denied if the printer still exists after the delete_printer_hook() is called (This used to be commit c05e2bdc0c068eb832035daea7962ab1a9e787b2)
2007-10-10r17348: Some C++ warningsVolker Lendecke1-8/+12
(This used to be commit ae6b9b34e59167e3958bfdb9997fa25340b9a0a3)
2007-10-10r17245: Second part of fix for #3962. Don't do a doubleJeremy Allison1-14/+8
free in the infolevel2 case. Free both queue and NT_PRINTER_INFO_LEVEL in the same place. Jeremy. (This used to be commit 6ac3a4ce78f42949013ae7bd675ff292fb0383ca)
2007-10-10r17244: There were several error paths where NT_PRINTER_INFO_LEVELJeremy Allison1-6/+17
wasn't being freed - also one enum jobs case where the NT_PRINTER_INFO_LEVEL and queue weren't being freed. Strange that Coverity or Klokwork didn't pick these up. Hopefully will fix #3962. Jeremy. (This used to be commit bb264123872bfec42ad85ec0c8afa3a8c7d1811e)
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)