summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss_nt.c
AgeCommit message (Collapse)AuthorFilesLines
2001-07-04strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell1-4/+4
can't redefine them. damn. (This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
2001-07-04The big character set handling changeover!Andrew Tridgell1-41/+26
This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
2001-06-26SGI compiler fixes.Herb Lewis1-12/+0
Jeremy (This used to be commit 45bf995bf62aa6cc176d57e2f954cc2d379717ef)
2001-06-13Make message receive fn static.Jeremy Allison1-1/+1
Jeremy. (This used to be commit d8807b19228b12ddd6d93c02d1646a470a8e71ef)
2001-06-02i18n bugfix merge from appliance.Tim Potter1-1/+6
(This used to be commit 73eb539da641ce806690bbd893f126859d531c98)
2001-05-18merge from 2.2 (deleteprinterdriver RPC)Gerald Carter1-0/+82
(This used to be commit 515caaf7b448e55206433a9ca04fb5078f91cde2)
2001-04-27More acl -> the_acl, %d with uid_t issues.Jeremy Allison1-13/+13
Jeremy. (This used to be commit 30edd7fdf1d791d76351a7cc23a83f97386c3087)
2001-04-27fix a bug in printer name handling that jerry reported.Jean-François Micouleau1-3/+8
names can be \\server -> print server \\server\printer -> printer printer -> printer J.F. (This used to be commit ec576722b79e3c5384dd40c532d4233dd6b1b9a8)
2001-04-16Getting medieval with compiler warnings as Jeremy puts it.Tim Potter1-1/+1
(This used to be commit d05c3cf0f47a3c863adbed7ad4ab8f3248cd072d)
2001-04-13Merge of Andrew's changes in 2.2.Jeremy Allison1-15/+11
Jeremy. (This used to be commit fc76681812b1469208ad6c8847afdfc68bc6db49)
2001-04-13As Andrew suggested, make smbrun return a fd for a deleted file which can thenJeremy Allison1-35/+23
be read. Jeremy. (This used to be commit e7d59d6de89a5fdd201e4b5c6072dab08b1519db)
2001-04-12Changed lp_add/delete/enum scripts to use lockdir if spool dir doesn'tJeremy Allison1-13/+9
exist for printer. Rather than using pid for suffix, use a 16 byte random string. Created generate_random_str() function in genrand.c. Still needs more testing but this is the way to go. Jeremy. (This used to be commit 71a330987f990007beb16f00fc468107361b5e9d)
2001-04-07Added 3 params to manipulate shares. "add share command/change share command/Jeremy Allison1-16/+0
delete share command". Implemented "delete" - more work to come on add and change. Jeremy. (This used to be commit 2e6b1759e14456421066ee131af70a495f862f2b)
2001-04-03Missed forms update - my CVS mistake.Jeremy Allison1-21/+70
Jeremy. (This used to be commit 06dee898607ff2bf194d53fb55ad6d82e8f305e8)
2001-04-03test commit for jeremyAndrew Tridgell1-1/+1
(This used to be commit d747ab8ab37ca20635f99a9dff64a635461852a6)
2001-03-28rename of 16 new_smb_io functions to smb_io_* for consistency sakeGerald Carter1-23/+23
(merge from 2.2) (This used to be commit ea963a648b889da9e47661c61c7fafe13b277e75)
2001-03-27merge from 2.2.Gerald Carter1-16/+16
(This used to be commit 817258f1174d27d74e8b21ffb5f1384db2238007)
2001-03-13Move to a handle database per pipe name, not per pipe.Jeremy Allison1-20/+33
Jeremy. (This used to be commit a24b248a77ccac364832ff7d4df083d437caf9ed)
2001-03-11Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison1-236/+198
RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
2001-03-07Sync up handle creation with 2.2 branch. We can now join AS/U domains andJeremy Allison1-11/+3
authenticate against them. Big/little endian issues fixed. Jeremy. (This used to be commit 0e6a34510ed598eaec7fe71a9c91fda528a4675c)
2001-03-03Fixed up overrun read when marshelling SYSTEMTIME struct. This was a subtle ↵Jeremy Allison1-2/+4
one... Jeremy. (This used to be commit 65275e73ee7c58352ee20175cbbb43378e16f417)
2001-03-03Roll back to using malloc/realloc on some of spoolss in head.Jeremy Allison1-57/+57
I'm having problems with talloc_realloc in the 2.2 branch and I want a stable reference. The only problem is this breaks the clean auto-generated code in *one* call in srv_spoolss.c (the rfnpcnex call). Jeremy. (This used to be commit 57a9340cbafa40f3a41e6c676c6f2477855fd799)
2001-03-02Arrgggh. Returning the SPOOL_INFO stuff requires that the reallocedJeremy Allison1-23/+36
data be realloced between different functions. This took a *long* time to track down (even with insure :-). Jeremy. (This used to be commit e61899f490e0d4109a5fc2faa04eefb934e8448c)
2001-03-02Move to talloc controlled NT forms.Jeremy Allison1-26/+9
Jeremy. (This used to be commit 3e190e693375c6032dd64bf8dd3c90f90dc4e3b4)
2001-03-01Fix memory leaks introduced in restructure.Jeremy Allison1-15/+13
Jeremy. (This used to be commit a355e11201e4dcb495b65b86e79de40d94c52a5b)
2001-03-01When opening a printserver use a global snum of -1.Jeremy Allison1-2/+2
Jeremy (This used to be commit 3f44cb6103fe8df9182fbbca7dc7888171b4352a)
2001-03-01rpc_parse/parse_spoolss.c: Fixed memory leak introduced by restructuring.Jeremy Allison1-4/+7
rpc_server/srv_spoolss_nt.c: Fixed problem with printer snum being read uninitialised. Jeremy. (This used to be commit 1552db715da576b41060f0d31d2c4cdec790c1d4)
2001-03-01Remove unused code.Jeremy Allison1-3/+3
Jeremy. (This used to be commit 3495d5cc3ba0f380fc78389b9ba17235ccd97ae4)
2001-03-01Ensure that SPOOL_NOTIFY_OPTION structs are safely copied out of the tallocJeremy Allison1-14/+62
area into the Printer_entry struct - these are used for changenotification. Jeremy. (This used to be commit 4c2a49168e53b5ed96d61c6bae908086c3852f64)
2001-02-28Finished converion of spoolss code to canonical format. Now to work on theJeremy Allison1-49/+169
PRINT_XX struct alloc/free issues. Jeremy. (This used to be commit db98d4b020032b2a934b21bfdf9082765692fc5a)
2001-02-28More converted to canonical format. Home now - do the rest tomorrow...Jeremy Allison1-40/+96
Jeremy. (This used to be commit 9d5979f51ec7b2a62fb9b290eb0393594cfa6224)
2001-02-28Converted more to canonical format... save as I go.,Jeremy Allison1-10/+32
Jeremy. (This used to be commit 1d4ff7a81bccce0e5701102314af4f9c64c55cd6)
2001-02-28Ooops - forgot to check the rpcclient and smbcacls compile with the newJeremy Allison1-3/+14
code :-(. Jeremy. (This used to be commit 70beabf73bdaad7b6a60e24b7a11798a411bed02)
2001-02-28Partial conversion of SPOOLSS code to canonical format. More to follow.Jeremy Allison1-23/+80
Once complete then the PRINTER_XX functions and structures will be converted to talloc control. Jeremy. (This used to be commit 8171cc56428920d8b765d077198893201f68766e)
2001-02-28Move to talloc control of SPOOL_XXX structs. Move to talloc control ofJeremy Allison1-25/+24
security descriptors and pointers. Syncup with 2.2 tree. Jeremy. (This used to be commit 14d5997dc841e78a619e865288486d50c245896d)
2001-02-23include/rpc_spoolss.h: Added JOB_STATUS_XXX defines.Jeremy Allison1-5/+31
include/smb.h: Added LPQ_xx enums to correspond with the NT JOB_STATUS_XXX. We need these to be different as we're storing LPQ_xx enums in the tdb already. rpc_server/srv_spoolss_nt.c: Don't need to return status strings as we're now returning status codes. smbd/lanman.c: Change the RAP status codes to have "RAP" in the name. printing/printing.c: Keep track of the status of a job. Allow a job to be deleted from one smbd when being submitted by another. Made logic in mutex clearer. Jeremy. (This used to be commit 71029da7dd74eb91dd6953752bdf238f319d985d)
2001-02-16Excise snprintf -> slprintf.Jeremy Allison1-64/+140
srv_samr.c: duplicate gid fix. srv_spoolss_nt.c: Merge of JF's work. uid.c: Fix for returning names when a PDC. Jeremy. (This used to be commit d938ad6963a2dd4eda930d508600ec1902dc2b16)
2001-02-03merge from APPLIANCE_HEAD (mapping access_required 0x0 toGerald Carter1-2/+6
PRINTER_ACCESS_USE) (This used to be commit 0c57b05de46f04dda941fcb4ba4f2a5a88b8dc9f)
2001-01-31Changes from SAMBA_2_2:David O'Neill1-51/+65
source/rpc_server/srv_spoolss_nt.c source/rpc_server/srv_spoolss.c source/include/proto.h - correct checking of access_required in openprinterex as talked with John R. and Jerry. You can only do server stuff (adding printers, changing forms, ..) if you're root or if user is in printer admin list. Printers options are grayed if you don't have the PRINTER_ADMINISTER flag in the secdesc. (This used to be commit f449d871bf0c385d8c57de2d795e1d7ef7f256f7)
2001-01-29Changes from APPLIANCE_HEAD:David O'Neill1-32/+55
source/include/proto.h - make proto source/printing/nt_printing.c source/rpc_server/srv_spoolss_nt.c - Fix for the overwriting of printerdata entries when WinNT and Win2k are modifying printer parameters on PCL printers. Turns out that Win2k creates a printer with a NULL devmode entry and then expects to set it on *OPEN* (yes this is insane). So we cannot return a "default" devmode for a printer - and we must allow an open to set it. source/tdb/tdb.c - Show freelist in an easier format. Show total free. - When storing a new record, allocate memory for the key + data before the tdb_allocate() as if the malloc fails a (sparse) hole is left in the tdb. source/tdb/tdbtool.c - Show freelist in an easier format. Show total free. source/tdb/Makefile - cleaned up Makefile dependancies source/smbd/lanman.c - Fix for Win9x corrupting it's own parameter string. source/printing/printfsp.c source/printing/printing.c source/rpc_server/srv_spoolss_nt.c source/smbd/close.c - Added normal close parameter into print_fsp_end() which treats an abnormal close as error condition and deletes the spool file. (This used to be commit 025f7a092ad258ff774e3f5e53737f8210cc8af6)
2001-01-25Changes from APPLIANCE_HEAD:David O'Neill1-20/+11
source/rpc_server/srv_spoolss_nt.c - Changed the se_access_check() call in _spoolss_open_printer_ex() to a print_access_check(). This allows the 'printer admins' smb.conf and other permission override parameters to affect the result of a printer open. - Don't perform access check when opening a handle on a print server as it breaks browsing the Printers folder. (This used to be commit bbe51d4b5f6da4c7668214511e25eff098bf03b1)
2001-01-23Changes from APPLIANCE_HEAD:David O'Neill1-12/+24
source/rpc_server/srv_spoolss_nt.c - add an access check to _spoolss_deleteprinter() to stop random users and passers by from deleting printers. source/lib/messages.c - converted global msg_all struct to a local in message_send_all() function. source/include/smb.h - added a success error code to the spoolss return codes. source/include/proto.h source/param/loadparm.c source/printing/printing.c - Added new parameter "total print jobs" to limit the total number of print jobs across all queues. Currently individual queues are limited by "max print jobs". (This used to be commit 02f154e729b0e8465d3e1e2ac794e6ab3844ce57)
2001-01-23Changes from APPLIANCE_HEAD:David O'Neill1-3/+0
source/rpc_server/srv_spoolss_nt.c - remove redundant srv_spoolss_sendnotify() calls from _spoolss_startdocprinter() and _spoolss_enddocprinter(), as its functionality is already covered in print_job_start() and print_job_end() source/printing/printing.c - force a print_queue_update() prior to print queue purge so that all jobs are purged. (This used to be commit 0ccc552203d6432cde844c5946b203b27f257b1a)
2001-01-19Changes from APPLIANCE_HEAD:David O'Neill1-2/+2
source/include/proto.h - make proto source/rpc_server/srv_spoolss_nt.c - clean up incorrect debug statement (This used to be commit f07f4e9c7b9bb5230f10fffe50beab163b6f7790)
2001-01-18Changes from APPLIANCE_HEAD:David O'Neill1-1/+1
source/rpc_server/srv_spoolss_nt.c - Fixed dereference of NULL pointer in security descriptor notification used by Win2K printers. (This used to be commit 1b6efd18943ef3ed0e2e061495d05cfdecd86c88)
2001-01-17Changes from APPLIANCE_HEAD:David O'Neill1-95/+431
source/include/proto.h source/include/rpc_spoolss.h source/rpc_parse/parse_spoolss.c source/rpc_server/srv_spoolss.c source/rpc_server/srv_spoolss_nt.c - speedups in printer queue enumeration - still room for improvement. The construct_dev_mode() still creates and destroys a printer info_2 structure every time it is called. - fixed job->devmode memory leak - converted printer job notification routines to use tallocated memory rather than a fixed 2K buffer. This reduces the memory requirements of a 4500 job queue enumeration from 90MB to about 16MB. (This used to be commit 7853b27bc1765d48d5f06837f8aca71a3a0d1e5d)
2001-01-17Changes from APPLIANCE_HEAD:David O'Neill1-18/+33
source/rpc_server/srv_spoolss_nt.c - Unrolled construct_notify_jobs_info() loop to only fetch printer info_2 structure once rather than num_print_jobs times. - convert command to unix codepage. - remove lp_remove_service() call as it prevents lp_killservice() from working. - Modified some DEBUG and DEBUGADD statements. source/param/loadparm.c source/param/params.c - change printer, preload, auto services to FLAG_DOS_STRING, reverted earlier changes to szPrintername et al, add comments. source/printing/load.c - fix bug with lp_auto_services() and strtok() source/printing/nt_printing.c source/printing/printing.c - remove redundant test that used SERVICE(snum) source/printing/pcap.c - add unix_to_dos() calls, add notes wrt FIXMEs for xxx_printer_fn() functions. source/web/swat.c - added FIXME comment. source/smbd/service.c - added comment re: dos codepage (This used to be commit 7b774b72c2857af9519012106714a9e2cb099da3)
2001-01-15Changes from APPLIANCE_HEAD:David O'Neill1-0/+2
source/rpc_parse/parse_lsa.c - off by one unistr length bug in init_lsa_trans_name() source/lib/util_sid.c - resolve more BUILTIN sid values to names. source/nsswitch/wb_client.c - fix typo in debug message - set errno on error so we don't get bogus value from last failure. source/rpc_server/srv_spoolss_nt.c - add debug to track number of open printer handles for ease of tracking handle leaks in the future. source/rpc_server/srv_lsa.c - fix off-by-one string bug. This was preventing NT from displaying names for well-know SIDs in printer permissions dialog. (This used to be commit 59229b9025cff54cbdd05e374616ffbf9c6fee33)
2001-01-11Changes from APPLIANCE_HEAD:David O'Neill1-43/+69
testsuite/printing/psec.c - Use lock directory from smb.conf parameter when peeking at the ntdrivers.tdb file. source/rpc_parse/parse_sec.c - fix typo in debug message source/script/installbin.sh - create private directory as part of 'make install'. source/nsswitch/winbindd_cache.c source/nsswitch/winbindd_idmap.c source/passdb/secrets.c source/smbd/connection.c - always convert tdb key to unix code-page when generating. source/printing/nt_printing.c - always convert tdb key to unix code-page when generating. - don't prepend path to a filename that is NULL in add_a_printer_driver_3(). source/rpc_server/srv_spoolss_nt.c - always convert tdb key to unix code-page when generating. - don't prepend server name to a path/filename that is NULL in the fill_printer_driver_info functions. source/printing/printing.c - always convert tdb key to unix code-page when generating. - move access check for print_queue_purge() outside of job delete loop. source/smbd/unix_acls.c - fix for setting ACLs (this got missed earlier) source/lib/messages.c - trivial sync with appliance_head (This used to be commit 376601d17d53ef7bfaafa576bd770e554516e808)
2001-01-08Changes merged from APPLIANCE_HEAD:David O'Neill1-1/+5
source/printing/printing.c source/rpc_server/srv_spoolss_nt.c - convert args for print command to unix codepage. (This used to be commit 1c0ae957f8f1abee7d22a18b6df092eb2a884ae1)