summaryrefslogtreecommitdiff
path: root/source3/printing/nt_printing.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r13547: add earlier checks to deny deleting a printer driver. The previousGerald Carter1-0/+5
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-4/+10
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-7/+7
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-10r12889: BUG 3380: fix crash when changing printer drivers caused by ↵Gerald Carter1-0/+2
accessing a previously freed pointer (This used to be commit bcce3b69f83f52deb308d8c2f5165000468bd552)
2007-10-10r11420: Fix issue pointed out by Dina Fine <dina@exanet.com>. We canJeremy Allison1-5/+5
only tell at parse time from the wire if an incoming name has wildcards or not. If it's a mangled name and we demangle the demangled name may contain wildcard characters. Ensure these are ignored. Jeremy. (This used to be commit 4cd8e2a96b98ff711905e8c6f416b22440c16062)
2007-10-10r10554: * BUG 3057: assume x64 drivers are v3 driversGerald Carter1-1/+8
* BUG 3087: allow smbspool to establisha geust connection using a username with no password (This used to be commit 39369c8041e0633e88c30e0c62530c2393ef80f6)
2007-10-10r10154: Fix crash bug on security descriptor upgrade (as seen on x86_64).Günther Deschner1-1/+2
Guenther (This used to be commit daa61ef75b4f7cf510b17cd0b85f5830c73b9279)
2007-10-10r9739: conver the reg_objects (REGSUBKEY_CTR & REGVAL_CTR) to useGerald Carter1-351/+145
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-15/+22
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-10r8543: merge volker's nt_printing_init() fix from trunk (r8526)Gerald Carter1-1/+6
but make sure to write the new version to the ntdrivers.tdb. (This used to be commit 9e50d696c3e101174670c47ecbd6401bec2ab3d3)
2007-10-10r8501: * disable printer handle object cache (was mostly usedGerald Carter1-66/+174
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-10r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the tortureJeremy Allison1-30/+49
tests on this as it's very late NY time (just wanted to get this work into the tree). I'll test this over the weekend.... Jerry - in looking at the difference between the two trees there seem to be some printing/ntprinting.c and registry changes we might want to examine to try keep in sync. Jeremy. (This used to be commit c7fe18761e2c753afbffd3a78abff46472a9b8eb)
2007-10-10r8089: successfully delete printer subkeys via the registry....now for valuesGerald Carter1-0/+32
(This used to be commit d3427960b0676c506c639b582a2544dc58990c9e)
2007-10-10r8066: * had to modify the printer data storage slightly in ntprinters.tdbGerald Carter1-9/+64
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)
2007-10-10r8025: *how* can this code have been around so long andGerald Carter1-14/+33
nver normalized the string used for printer and sec_desc key lookups ????? normalized sharename to lower case before storing/fetching from tdb. Need to look at drivers and forms tdb as well (perhaps). (This used to be commit 4aec5dce5c2d0b5c686123a624b58097be9d911a)
2007-10-10r7983: clean up some use of un-initialized variables found by valgrindGerald Carter1-10/+5
(This used to be commit 5f4a3f61a354346d7dde11d6d7930abe007b9603)
2007-10-10r7882: Looks like a large patch - but what it actually does is make SambaJeremy Allison1-13/+13
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-10r7692: start versioning the registry.tdb file since it can be modified nowGerald Carter1-4/+1
(This used to be commit a091b37d59d1e0228a9c8d4bd2a31e9bbaafde99)
2007-10-10r7691: * add .gdbinit to the svn:ignore filesGerald Carter1-2/+0
* start adding write support to the Samba registry Flesh out the server implementations of RegCreateKey(), RegSetValue(), RegDeleteKey() and RegDeleteValue() I can create a new key using regedit.exe now but the 'New Key #1' key cannot be deleted yet. (This used to be commit e188fdbef8f0ad202b0ecf3c30be2941ebe6d5b1)
2007-10-10r7620: when adding a new printer driver, we should copy the filesGerald Carter1-40/+22
(not move) to the W32X86/{2,3}/ directory. Printmig.exe copies the driver files for all drivers to print$/W32X86 and the calls AddPrinterDriver() for each driver. If we move the file, then adding a driver which shares a file with a previous driver will fail. I can now restore drivers in bulk to a Samba 3 server. (This used to be commit 46cd95c9b48a00a51139d3654352d4399b774a9b)
2007-10-10r7614: convert move_driver_to_download_area() to return WERROR in order to ↵Gerald Carter1-5/+5
provide better error messages to clients when a AddPrinterDriver[Ex]() call fails (This used to be commit c98e17446afffc4b12f1a31f6e5cce517fc0a95b)
2007-10-10r7584: cleanup the default printer security descriptorGerald Carter1-32/+29
(This used to be commit 26387fc74c1157157e7e8728003a39d10aeb4cc1)
2007-10-10r7200: Don't use memset, use SET_STAT_INVALID (has the same effect).Jeremy Allison1-3/+3
Jeremy. (This used to be commit 0b6f87d5e14da461bd2b1c3a4e6f47a69d2cd1c4)
2007-10-10r7041: compile fixes....long day I guessGerald Carter1-2/+3
(This used to be commit ec3ef5ddbe12fa6ebe8f58979625c671d181c519)
2007-10-10r7038: * upgrade version of nt*tdb files. Have to fixGerald Carter1-10/+145
some issues in the printer security descriptors. Ensure that each printer sd has an oaner and group SID (BUILTIN\Administrators) and that we utilize more than the generic bits assigned in <= 3.0.14a. (This used to be commit c72182c1e20225a655376fd23915ac6053b94633)
2007-10-10r6263: Get rid of generate_wellknown_sids, they are const static and ↵Volker Lendecke1-1/+0
initializable statically. Volker (This used to be commit 3493d9f383567d286e69c0e60c0708ed400a04d9)
2007-10-10r6225: get rid of warnings from my compiler about nested externsHerb Lewis1-1/+1
(This used to be commit efea76ac71412f8622cd233912309e91b9ea52da)
2007-10-10r5792: Added new parameter "inherit owner". If set on a share, the created ↵Jeremy Allison1-1/+1
file/directory will be owned by the same uid as the containing directory. Doing this for directories in a race-free mannor has only been tested on Linux (it depends on being able to open a directory and then do a fchown on that file descriptor). If this functionality is not available then the code silently downgrades to not changing the ownership of a new directory. This new parameter (docs to follow) finally makes it possible to create "drop boxes" on Samba, which requires all files within a directory to be commonly owned. A HOWTO on how to use this will follow. Jeremy. (This used to be commit 2e1f727184b9d025d2e3413bdd3d01d5ca803a41)
2007-10-10r5683: BUG 2363: allow 'in use' driver to be removed as long as one 'Windows ↵Gerald Carter1-8/+47
NT x86' driver remains' (This used to be commit 743ddbc7f204977431b8eaa48c3838b3cc9bdb11)
2007-10-10r5029: after talking to Rob, ensure that we set the NETIOSNAME.domainnameGerald Carter1-1/+10
as the longname in the published printer information since this is what we will have used when we joined the domain. More testing on this tomorrow. (This used to be commit d64fd1116d5fe29807be29c73809317f88fdb033)
2007-10-10r4874: add DOmain Admins (Full Control) to the default printer sd if we are a DCGerald Carter1-5/+24
(This used to be commit 8971a8544274a7f3643ae67be744d7dab181973d)
2007-10-10r4805: Last planned change to the privileges infrastructure:Gerald Carter1-1/+2
* rewrote the tdb layout of privilege records in account_pol.tdb (allow for 128 bits instead of 32 bit flags) * migrated to using SE_PRIV structure instead of the PRIVILEGE_SET structure. The latter is now used for parsing routines mainly. Still need to incorporate some client support into 'net' so for setting privileges. And make use of the SeAddUserPrivilege right. (This used to be commit 41dc7f7573c6d637e19a01e7ed0e716ac0f1fb15)
2007-10-10r4740: allow SE_PRINT_OPERATORS to have printer admin accessGerald Carter1-3/+14
(This used to be commit 85731706c9d794e8bd3f26ce9b1f881c1ee6a3ba)
2007-10-10r4539: patch from Rob -- adding real printcap name cache function to speed ↵Gerald Carter1-3/+19
up printcap reloads (This used to be commit 1cad5250932b963c2eb9b775221b13db386d601b)
2007-10-10r4089: fix logic error in add_a_form() that only compared N characters ↵Gerald Carter1-2/+4
instead of the entire form name (This used to be commit e3decbc441686486903a4863daa862ed1672e405)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-23/+27
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-10r3727: Update from Rob Foehl (rwf@loonybin.net):Jim McDonough1-24/+10
Try modifying printer before adding it,since add logic appends ObjectClass to mods, which caused a contraint violation when modifying an already published printer. Also cleanup the check_published_printers() logic when verifying published status on startup. (This used to be commit 82eb168c827b4b7310b42c0f36c504e0fa16dc99)
2007-10-10r3710: fix another safe_strcpy() warning SPAM with the printer drivcenameGerald Carter1-1/+1
(This used to be commit 5eac16464dfe58ec2c725888993f313fdb609f9b)
2007-10-10r3707: 2028: avoid false error messages when copying a long printer name to ↵Gerald Carter1-1/+1
the device mode (This used to be commit c9613214a5797adbb62a953bd5e28cf9fe2692ee)
2007-10-10r3069: add 'force printername' service parameter for people that want to ↵Gerald Carter1-3/+9
enforce printername == sharename for spoolss printing (This used to be commit d47b8a0b4f348171df35b3b0028ce7d99fab8af3)
2007-10-10r3049: fixing some calls in the printing code to stanard_sub_basic(); fix ↵Gerald Carter1-1/+1
standard_sub_snum() to use the current user's gid; add some (snum == -1) checks to standard_sub_advanced() (This used to be commit 8c3fd1908d201e9891878ff4c3259ed9690dff97)
2007-10-10r2996: readability fix for length check; no semantic changesGerald Carter1-1/+1
(This used to be commit 668ab6984afa7d9e0c15e87c5d45df7560e467e6)
2007-10-10r2955: fixing a segfault uncovered by the changes for BUG 1519Gerald Carter1-3/+5
(This used to be commit 1664395257eb2425246e200ebde4384aa54484a4)
2007-10-10r2821: Adding "Windows x64" as architecture string and driverdir "x64" for theGünther Deschner1-0/+2
64bit AMD platform. (This used to be "Windows AMD64" and "AMD64" in one of the release candidates of SP2 for Windows XP. AMD64 is obviously still supported but not documented.) Guenther (This used to be commit cc5892f0411b8eb5daebe746164a2cf21d3d4c68)
2007-10-10r2768: BUG 1519: save the hostname used in the open_printer_ex() for later ↵Gerald Carter1-10/+25
reuse when filling in the spolss replies (also gets rid of get_called_name() (This used to be commit 57db8ca91f52329c7f8985c04463b6b69015b0c4)
2007-10-10r2570: minor fix with Rob's patch. use dos_errstr() instead of W_ERROR_V() ↵Gerald Carter1-2/+2
when using %s in the format string (This used to be commit b26e4dbd7fd616e672331fd36441b8bf74157904)
2007-10-10r2569: Patch from Rob Foehl <rwf@loonybin.net>:Gerald Carter1-112/+169
- fix typo in libads/ldap_printer.c:39, ads_find_printer_on_server() (originally libads-typo.patch) - fix leak in printing/nt_printing.c, is_printer_published() (originally is_printer_published-leak.patch) - fix double print_backend_init() calls, now only called from main() - restructuring in printing/nt_printing.c - replaced (un)publish_it() with ads-specific functions - moved common code to nt_printer_publish() - improved error handling in several places - added check_published_printers() in printing/nt_printing.c, to verify that each published printer is actually in the directory at startup - changed calling semantics of mod_a_printer, dump_a_printer, and update_driver_init to be more consistent with the rest of the api and reduce some copying (This used to be commit 50a5a3dbd02acb0d09133b6e42cc37d091ea901d)
2007-10-10r2133: Several fixes:Gerald Carter1-1/+2
* BUG 1627: fix for NIS compiles on HPUX 11.00, AIX 4.3 and 5.1 patch from Olaf Flebbe <o.flebbe@science-computing.de>. Will need to watch this one in the build farm. * Fix bug found by rwf@loonybin.net where the PRINT_ATTRIBUTE_PUBLISHED was getting reset by attempts to sanitize the defined attributes (PRINTER_ATTRIBUTE_SAMBA) * Resolve name conflict on DEC OSF-5.1 (inspired by patch from Adharsh Praveen <rprav@india.hp.com>) * Work around parsing error in the print change notify code (not that the alignment bug is still there but reording the entries in the array works around it). * remove duplicate declaration of getprintprocdir from rpcclient. (This used to be commit 7474c6a446037f3ca2546cb6984d800bfc524029)
2007-10-10r1885: tighten the cache consistency with the ntprinters.tdb entry an the in ↵Gerald Carter1-0/+33
memory cache associated with open printer handles; also make sure that register_messages_flags() doesn't overwrite the originally registers flags (This used to be commit 540daf71d8ad189af5dd6d45aa1ce2b3d67da752)
2007-10-10r1692: first commit :)Günther Deschner1-0/+2
* 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)