summaryrefslogtreecommitdiff
path: root/source3/printing
AgeCommit message (Collapse)AuthorFilesLines
2000-05-24a fairly big change in spoolss.Andrew Tridgell2-761/+465
got rid of the forms, drivers and printers files in the nt drivers directory and instead use a single tdb note that this is _not_ all finished. (This used to be commit 06763d1ec2fafc42f8ee3f36f0aeacceb3a7109d)
2000-05-12added spool_io_printer_driver_info_level_6()Andrew Tridgell1-1/+76
thsi function and the associated header structure were autogenerated using a little awk based code geerator I wroe ths evening. I'll commit that next ... (This used to be commit 974813f0d4afb6c14ed27c48ab24b19932557f9f)
2000-05-12While we're all making incompatible tdb changes, I changed the implementationTim Potter1-3/+3
of tdb_{store,get}_int() to store the length of the string key + 1 so the stored key contains the trailing NULL character. This allows normal string library routines to manipulate keys. Also renamed tdb_get_int() to tdb_fetch_int() to keep the set of verbs consistent. (This used to be commit a423c7c5f21dc4046530b85482dee88dcfcbf070)
2000-05-10fail a print start on a deleted auto printerAndrew Tridgell1-0/+6
(This used to be commit f1f92bf4da75ec6fccd34b07719d642196665258)
2000-05-10more merging voodooAndrew Tridgell1-0/+4
this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic - this isn't permanent, it should go after another few merge steps have been done (This used to be commit 92109d7b3c06f240452d39f669ecb8c9c86ab610)
2000-05-04 - use full_name instead of real_nameAndrew Tridgell1-10/+0
- got rid of guest map code in lpq parser (This used to be commit 8e53f781d3cf6a7007764916a0d8e8f1abea1f66)
2000-05-02added support for deleting printers into the spoolss systemAndrew Tridgell1-0/+15
(This used to be commit e72a5718537b84409fc20ff21951b1d1ab24d97f)
2000-05-02Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison1-2/+2
of doing a system call every time we want to just get our pid. Jeremy. (This used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a)
2000-05-01handle tabs in printcap filesAndrew Tridgell1-2/+2
this is needed for lprng (This used to be commit c40e0a5d3bfa11cb3699bdba1ded91515cabaf5d)
2000-04-25moved trans2.h and nterr.h into includes.h with all our other includesAndrew Tridgell1-1/+0
(This used to be commit d7cd7c88fdabb01d9e40ae8a657737907a21ac37)
2000-04-24Now that fsp's are created on successful file open, the structure memberJeremy Allison1-1/+0
fsp->open is no longer needed (if an fsp pointer is valid, then it's open :-). NB for Luke, this patch also did not apply to TNG. TNG is not yet identical w.r.t file serving with HEAD. This makes it impossible for me to help maintain TNG. Please fix asap. lib/substitute.c: Removed unused variable (pidstr). Jeremy. (This used to be commit 389b700a26e8a308a0dff6fc038c38068aa0119a)
2000-04-24fixed another memory leakAndrew Tridgell1-0/+1
(This used to be commit 780713f67a848ade49c523cda96015ab46337cde)
2000-04-23fixed a memory leak I caused last week with my lines[] changesAndrew Tridgell1-6/+1
(This used to be commit 4c889d08aed3cebba54abbc96f28a2d1c545a4b5)
2000-04-23check for a valid snum when running a printing commandAndrew Tridgell1-0/+5
(This used to be commit 381ddb464fd0da671d567177f1ded10f67952692)
2000-04-23split fsp specific routines out of printing.c to fix linking problemAndrew Tridgell2-65/+91
in TNG (This used to be commit 82df25b28b94b0041676fb433e0e677acb544579)
2000-04-22This is a *big* checkin that may break some things, but implements theJeremy Allison1-3/+14
new open mechanism Andrew & I discussed. config.sub: configure: Included the QNX patch. include/vfs.h: smbd/vfs-wrap.c: smbd/vfs.c: Added ftruncate vfs call (needed). Note that we will also need locking calls in the vfs (to be added). lib/util_unistr.c: nmbd/nmbd_processlogon.c: Fix for NT domain logons causing nmbd to core dump. Also fix for sidsize DOS bug. locking/locking.c: Check value of ret before using it for memdup. printing/printing.c: Convert print_fsp_open to return an allocated fsp. rpc_server/srv_lsa.c: Fix for NT domain logons. I have removed all use of lp_share_modes() from the code (although I left the parameter in the table for backwards compatibility). It no longer makes sense for this to exist. smbd/close.c: Removed lp_share_modes(). smbd/fileio.c: Fixed parameters to unlock_share_entry call in panic code. smbd/files.c: Correctly set the unix_ERR_code to ERRnofids on fsp allocation fail. smbd/nttrans.c: smbd/reply.c: smbd/trans2.c: Changed all occurrences of open_file_shared/open_directory/ open_file_stat to return an fsp from the call. smbd/open.c: Changed all occurrences of open_file_shared/open_directory/ open_file_stat to return an fsp from the call. In addition I have fixed a long standing race condition in the deny mode processing w.r.t. two smbd's creating a file. Andrew, please note that your original idea of using open with O_EXCL in this case would not work (I went over the races very carefully) and so we must re-check deny modes *after* the open() call returns. This is because there is a race between the open with O_EXCL and the lock of the share mode entry. Imagine the case where the first smbd does the open with O_EXCL and a deny mode of DENY_ALL, but is pre-empted before it locks the share modes and creates the deny mode entry for DENY_ALL. A second smbd could then come in with O_RDONLY and a deny mode of DENY_NONE and the two opens would be allowed. The *only* way to fix this race is to lock the share modes after the open and then do the deny mode checks *after* this lock in the case where the file did not originally exist. This code will need extensive testing but seems to initially work. Jeremy. (This used to be commit ab0ecc39d688f16b9692fe90b991f0b89287070a)
2000-04-19use sys_fsusage() not disk_free() in printing.cAndrew Tridgell1-3/+3
(This used to be commit 763704f78fc44976b2d977e8a08ffdeb727903c4)
2000-04-18locking/locking.c: Fixed placeholder code for POSIX locking.Jeremy Allison1-7/+7
printing/printing.c: Cast tdb_delete to (tdb_traverse_func) to stop warning. tmpfile gives mirror warning. smbd/groupname.c: Remember to file_lines_free() on exit. tdb/tdb.h: Add tdb_traverse_func typedef. Jeremy (This used to be commit 204ca1195c86499bd9beb273ce573db7a56ccead)
2000-04-18don't parse blank linesAndrew Tridgell1-0/+2
(This used to be commit 8b1afe7e1af0a62244632e0a58b9e513ab4366f0)
2000-04-18fixed some crash bugs in the nt forms parsingAndrew Tridgell1-6/+6
(This used to be commit e505a6ddf3df37ca485cae117c53fa96d736f897)
2000-04-16converted a bunch more functions to use a fd instead of a FILE*Andrew Tridgell1-42/+41
to support some of this I added the following functions in util_file.c file_lines_pload : load lines from a pipe file_pload : load a pipe into memory (This used to be commit a09470817c5b21dba42f9ef4ce5e8b768a254c0b)
2000-04-16got rid of all the FILE* calls in the NT print system.Andrew Tridgell1-118/+112
this also fixes a few security holes in that code. JF - you need to be careful about open files for writing! symlinks can trap you. note that I always unlink() the file first, then open with O_EXCL. That is a cheap trick to avoid the symlink problems. (This used to be commit ad56e3d7915100a83b33ad36e627e13325197942)
2000-04-16improved the error handling and added queue pause and resumeAndrew Tridgell1-25/+43
(This used to be commit 5f5b79c9264510f5851ad1d6f3ce9e2b15e4a0da)
2000-04-16the bulk of the changes. Also split the loadparm related code into ↵Andrew Tridgell2-309/+797
printing/load.c so swat can get it without linking to the backend code ------------ The following series of commits are for the new tdb based printing backend. This completely replaces our old printing backend. Major changes include: - all print ops are now done in printing/*.c rather than scattered all over the place - system job ids are decoupled from SMB job ids - the lpq parsers don't need to be nearly so smart, they only need to parse the filename, the status and system job id - we can store lots more info about a job, including the full job name - the queue cache control is much better I also added a new utility routine file_lines_load() that loads a text file and parses it into lines. This is used in out lpq parsing and I also want to use it to replace all of our fgets() based code in other places. (This used to be commit a902caf8d78ae4cb11ea3776d10273cb37d5fcd0)
2000-04-10rather than doing print file open processing in open.c we now handleAndrew Tridgell1-0/+74
it in print_open_file() that removes a lot of special cases in open.c and makes the print handling code much easier to understand. there is still lots to do in printing.c, but this at least gets printing separated from the mainline code (This used to be commit e064422af335cd791752a2b54a17a13467ace041)
2000-04-10split out the lpq parsing code into a separate fileAndrew Tridgell2-858/+883
printing/lpq_parse.c getting ready for the new printing backend (This used to be commit 0ec1072e0143952139be64e8001582eadcc9f60e)
2000-04-06Modified interfaces and added checks around *all* *alloc callsJeremy Allison1-29/+21
so that errors are returned on memory allocation failure. Jeremy. (This used to be commit 9a118cd4a2b03146b341eeffb62144a2d29b574c)
2000-04-06filled the architecture table (useless for the moment).Jean-François Micouleau1-6/+6
fixed GetJob. J.F. (This used to be commit 3fea49e1d896987c54187cb326607284810fcb0d)
2000-04-05JF - you might want to look at this patch.Jeremy Allison1-23/+134
Went through and fixed up all failure possibilities. If something (malloc, file open etc.) fails, then this code goes through and cleans up all allocated resources on exit. This is the equivalent of a C++ destuctor for the allocated structures. We need code to be written like this to pass purify tests. Jeremy. (This used to be commit b260ef7cb1fb2b1e4661cc54eab403eb01fbfc35)
2000-04-05Added strerror at debug level 0 on file create/open fail. Helps catchJeremy Allison1-3/+3
problems. Jeremy. (This used to be commit a25891f52491a3aed89302704ba24df832aedf0b)
2000-04-03Fix for spoolss code from Alan Hourihane <Alan.Hourihane@pinacl.co.uk>.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 33aa541e89ebe2e6a7c1808cea6dc7128bdb0587)
2000-03-22acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.Jeremy Allison1-1/+1
include/byteorder.h: Added alignment macros. include/nameserv.h: Added defines for msg_type field options - from rfc1002. lib/time.c: Typo fix. lib/util_unistr.c: Updates from UNICODE branch. printing/nt_printing.c: bzero -> memset. smbd/connection.c: Added check for UT_SYSLEN for utmp code. Other fixes : Rollback of unapproved commit from Luke. Please *ask* next time before doing large changes to HEAD. Jeremy. (This used to be commit f02999dbf7971b4ea05050d7206205d7737a78b2)
2000-03-16Fixes to add "paranoid" option to popen. Checks some basic things.Jeremy Allison1-1/+1
Jeremy (This used to be commit 3b8cbb10de322fd7a1063fb5b681790b10d24ab0)
2000-03-13Interim fix for LPRng. If a lpq parsed line start with a space, we skipJean-François Micouleau1-0/+8
it, to prevent false status return value. Jeremy, it's a gross hack but you should consider it for 2.0.7 also. J.F. (This used to be commit 2b1663ec13d9c481fb535c757744068919201f6a)
2000-03-10getprinter level 0: was to short, found most of the fields, undocumented,Jean-François Micouleau1-33/+57
undecoded, nothing in MSDN, but now it works :-) cleanup of error codes. fixed some dfs declarations function. J.F. (This used to be commit 87da4404aba29a2ebd999886e4c06958c96d3e05)
2000-03-07fixed enumprinterdata.Jean-François Micouleau1-11/+10
J.F. (This used to be commit 2b4f09e7bbcbf1bf835f299e9f6bf89b32a7f03f)
2000-02-15Added replacement functions sys_popen and sys_pclose. These are basedJeremy Allison1-6/+2
on the glibc source code and are safer than the traditional popen as they don't use a shell to exec the requested command. Now we have these functions they can be tightened up (environment etc.) as required to make a safe popen. It should now be safe to add the environement variable loading code to loadparm.c Jeremy. (This used to be commit b52e92b09d4ca3b66e534f520468dee27065d048)
2000-02-15fix the reply of rpc_alter_contextJean-François Micouleau1-70/+70
OpenPrinterEx is now decoding correctly the query most of the EnumXXX use the new_buffer struct. check the (un)marshalling return code. conclusion: still a long way to go. all the client code has to be rewritten, and I still wonder how to implement correctly the notify stuff. (This used to be commit 3d6d3863751787b08d40268c83221add1487a5c9)
2000-02-07First commit of the spoolss code to the HEAD branch.Jean-François Micouleau1-0/+1413
still needs a lot of cleaning/debuging. J.F. (This used to be commit bd9d4cdde9193c120c6f4e8cf72f87cd67a9387e)
2000-01-29Wrapped popen calls in HAVE_POPEN - needed if we are to add theJeremy Allison1-0/+4
env patch. Jeremy. (This used to be commit 94c075faee88538e48d1898f1694500b8a5d4c8b)
1999-12-17 printing/print_cups.c from 2.0.6Andrew Tridgell1-0/+206
(This used to be commit 452776a5a7951c84437e424874ff110fc56296db)
1999-12-132nd phase of head branch sync with SAMBA_2_0 - this delets all the files ↵Andrew Tridgell1-1412/+0
that were in the head branch but weren't in SAMBA_2_0 (This used to be commit d7b208786590b5a28618590172b8d523627dda09)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell3-99/+115
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-12-12delineation between smb and msrpc more marked. smbd now constructsLuke Leighton2-20/+51
pdus, and then feeds them over either a "local" function call or a "remote" function call to an msrpc service. the "remote" msrpc daemon, on the other side of a unix socket, then calls the same "local" function that smbd would, if the msrpc service were being run from inside smbd. this allows a transition from local msrpc services (inside the same smbd process) to remote (over a unix socket). removed reference to pipes_struct in msrpc services. all msrpc processing functions take rpcsrv_struct which is a structure containing state info for the msrpc functions to decode and create pdus. created become_vuser() which does everything not related to connection_struct that become_user() does. removed, as best i could, connection_struct dependencies from the nt spoolss printing code. todo: remove dcinfo from rpcsrv_struct because this stores NETLOGON-specific info on a per-connection basis, and if the connection dies then so does the info, and that's a fairly serious problem. had to put pretty much everything that is in user_struct into parse_creds.c to feed unix user info over to the msrpc daemons. why? because it's expensive to do unix password/group database lookups, and it's definitely expensive to do nt user profile lookups, not to mention pretty difficult and if you did either of these it would introduce a complication / unnecessary interdependency. so, send uid/gid/num_groups/gid_t* + SID+num_rids+domain_group_rids* + unix username + nt username + nt domain + user session key etc. this is the MINIMUM info identified so far that's actually implemented. missing bits include the called and calling netbios names etc. (basically, anything that can be loaded into standard_sub() and standard_sub_basic()...) (This used to be commit aa3c659a8dba0437c17c60055a6ed30fdfecdb6d)
1999-09-27don't leak printer handles,Jean-François Micouleau1-3/+3
don't coredump when adding forms, and a small non obvious memory leak in the rpc buffers J.F. (This used to be commit bee11f8889378b9f1cc6e2818fd0f8dd7ddcf10d)
1999-09-25Don't duplicate forms anymore, just update the definition.Jean-François Micouleau1-14/+51
Many memory leaks fixed. J.F. (This used to be commit f328ae8024584599324ae4263bb9fb89a358279f)
1999-07-01many small bugs...Jean-François Micouleau1-1/+1
J.F. (This used to be commit bda429eb73fa3c0a6d59cf47a8285e3fc0cdae98)
1999-06-22Fixed most memory leak and big-endian bug in the spoolss code.Jean-François Micouleau1-1/+88
Also added addform/setform rpc api calls. Now I can add/change forms from the server property dialog box. Jean Francois (This used to be commit 8d73f83b6c112327a51c0df2e96a1866deb13c3a)
1999-05-03last part of RPC api change.Jean-François Micouleau1-2/+2
and of rpcclient eventlog funtion Jean Francois (This used to be commit 7fc8659e83bf0269df297016beac6793ff0bdf32)
1999-04-27Adding RPC spoolss code support and some new low-level printing functions.Jean-François Micouleau1-0/+1289
Jean Francois (This used to be commit 9e8192cc674db7551569d23982877dd25c488b50)