summaryrefslogtreecommitdiff
path: root/source3/printing/nt_printing.c
AgeCommit message (Collapse)AuthorFilesLines
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)
2007-10-10r1085: Now it's had some proper user testing, merge in the deferred open ↵Jeremy Allison1-6/+6
fix. I'm still doing more testing, but it fixes a behaviour that we've been wrong on ever since the start of Samba. Jeremy. (This used to be commit 894cc6d16296b934c112786eec896846156aee5d)
2007-10-10r783: fix bug in reading printer data from disk; all ow valuenames with ↵Gerald Carter1-4/+10
embedded '\'s (This used to be commit fdc1633c348b072a6dde45a3d9b3b8a19744613d)
2007-10-10r689: removed unneeded forward declarationsGerald Carter1-3/+0
(This used to be commit ae0a770d607b13b454bff88aa52b478845b71a04)
2007-10-10r551: BUG 1293: fix double free in printer publishing codeGerald Carter1-2/+1
(This used to be commit f9a371f33b89852e42004469cb60efec973067bd)
2007-10-10r543: possible fix for BUG 1293 -- initialize pointer to NULL to ensure the ↵Gerald Carter1-0/+1
failure check is valid (This used to be commit b7005e6989946bbd0e42d84d2688f3a96a649791)
2007-10-10r460: Fix for broken driver upload/delete path processing.Jeremy Allison1-14/+46
Jeremy. (This used to be commit 78be46d13bc88a300ab627c59862559d5491ee46)
2007-10-10r196: merging struct uuid from trunkGerald Carter1-9/+12
(This used to be commit 911a28361b9d8dd50597627f245ebfb57c6294fb)
2004-04-02Added per-share parameter "store dos attributes". When set, will storeJeremy Allison1-3/+3
dos attributes in an EA. Based on an original patch from tridge, but modified somewhat to cover all cases. Jeremy. (This used to be commit ed653cd468213e0be901bc654aa3748ce5837947)
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)
2004-03-03Use a common function to parse all pathnames from the wire. This allowsJeremy Allison1-5/+5
much closer emulation of Win2k3 error return codes. Jeremy. (This used to be commit c9f31fafeda6ad79e590276f36e03ecd2e93f818)
2004-01-30Fix up name canonicalization (needed for krb5 keytab support later).Jeremy Allison1-1/+1
Remove source_env handler (no longer used in any codepath). Jeremy. (This used to be commit 3a3e33603084048e647af86a9badaaf49433c789)
2003-12-31auth/auth_util.c:Andrew Bartlett1-2/+2
- Fill in the 'backup' idea of a domain, if the DC didn't supply one. This doesn't seem to occour in reality, hence why we missed the typo. lib/charcnv.c: lib/smbldap.c: libads/ldap.c: libsmb/libsmbclient.c: printing/nt_printing.c: - all the callers to pull_utf8_allocate() pass a char ** as the first parammeter, so don't make them all cast it to a void ** nsswitch/winbind_util.c: - Allow for a more 'correct' view of when usernames should be qualified in winbindd. If we are a PDC, or have 'winbind trusted domains only', then for the authentication returns stip the domain portion. - Fix valgrind warning about use of free()ed name when looking up our local domain. lp_workgroup() is maniplated inside a procedure that uses it's former value. Instead, use the fact that our local domain is always the first in the list. Andrew Bartlett (This used to be commit 494781f628683d6e68e8ba21ae54f738727e8c21)
2003-12-30Move to short lived TALLOC_CTX* for allocating printerGerald Carter1-4/+22
objects from the print handle cache. Fixes bug that caused smbd to consume large amounts of RAM when (a) a printer handle was kept open over an extended period of time, and (b) the client issued frequent requests that resulted in a call to get_a_printer() (This used to be commit 10b9976e0ab961dc34c9426f0a497e0f81a5e17f)
2003-11-03Fix more 64-bit printf warnings.Tim Potter1-8/+8
(This used to be commit 23443e3aa079710221557e18158d0ddb8ff48a36)
2003-10-29Fixes to check for wraps which could cause coredumps.Jeremy Allison1-5/+14
Jeremy. (This used to be commit ad06edd1bb58cc5e2c38a364b1af96a933b770af)
2003-10-20make sure we have a devmode before copying a string to the devicename; patch ↵Gerald Carter1-3/+4
from metze (This used to be commit 1700e83ac8035db7d22b8c64c10f63cb3e3b9eb7)
2003-09-19Ensure that dup_sec_desc copies the 'type' field correctly. This causedJeremy Allison1-3/+3
me to expose a type arguement to make_sec_desc(). We weren't copying the SE_DESC_DACL_AUTO_INHERITED flag which could cause errors on auto inherited checks. Jeremy. (This used to be commit 28b315a7501f42928d73efaa75f74146ba95cf2d)
2003-09-10Fix a nasty mess, and also bug #296. passdb/pdb_ldap.c was not convertingJeremy Allison1-5/+39
to/from utf8 for some calls. The libads code gets this right. Wonder why the passdb code doesn't use it ? Jeremy. (This used to be commit 910d21d3164c2c64773031fddaad35ea88e72a04)
2003-09-05More tuning from cachegrind. Change most trim_string() calls to trim_char(0,Jeremy Allison1-1/+1
as that's what they do. Fix string_replace() to fast-path ascii. Jeremy. (This used to be commit f35e9a8b909d3c74be47083ccc4a4e91a14938db)
2003-08-25make sure the printer data value exists before saying you deleted itGerald Carter1-0/+5
(This used to be commit 017133ea0c3eb0579710727379585df2b585614d)
2003-08-23it never amazes me when some new things crawls out of the windowsGerald Carter1-1/+6
spooler. :-( When installing the Adobe PS driver onto a Samba printer via cupsaddsmb, I noticed a WIN2k client sending DeletePrinterData("DependentFiles") pver and over. I also noticed that we never checked to see if the value was valid. No now we do and return WERR_BADFILE which I think is correct. Next, I noticed that we never wrote the updated printer out to disk after a succesfully DeletePrinterData[Ex](). Finally, I found a driver (Canon BJC 1000 using the Adobe PS drivers and foomatic PPD file) that was destroying the device name string in the devmode. So now get_a_printer_2() always writes out the device name in \\server\share form. I think these changes might fix bug 294. (This used to be commit deb25780874b66e68ac597db24fbc50e7f7458b5)
2003-08-16stupid...stupid...stupid....fix bug 294 by looking at the right arch stringGerald Carter1-1/+1
(This used to be commit 584df6b8d691b30d6ead485cfc8dce7bb30cd8bb)
2003-08-15get rid of more compiler warningsHerb Lewis1-2/+2
(This used to be commit 398bd14fc6e2f8ab2f34211270e179b8928a6669)
2003-08-14fix bug 294; win9x driver lookups should always use version 0Gerald Carter1-5/+16
(This used to be commit 8cc1a49c13b24e8fe501caa0d7d695d34a58d08d)
2003-07-14fix cache coherency bug in print handle print_info_2 cache.Gerald Carter1-17/+19
Needs to be rewritten to use a reference counter, but this will work for now. also the memory allocation in the printing code needs to be cleaned up to use talloc exclusively. (This used to be commit 3d293027563b36411b7f84ed9d8f47f926271c6f)
2003-06-25ifdef out some functions that are not used when HAVE_ADS is not definedGerald Carter1-1/+1
(This used to be commit 2d192e0431c7b754cf9db2306acb01fbe4068a14)