summaryrefslogtreecommitdiff
path: root/source3/printing
AgeCommit message (Collapse)AuthorFilesLines
2009-05-20s3: Change unix_convert (and its callers) to use struct smb_filenameTim Prouty1-1/+16
This is the first of a series of patches that change path based operations to operate on a struct smb_filename instead of a char *. This same concept already exists in source4. My goals for this series of patches are to eventually: 1) Solve the stream vs. posix filename that contains a colon ambiguity that currently exists. 2) Make unix_convert the only function that parses the stream name. 3) Clean up the unix_convert API. 4) Change all path based vfs operation to take a struct smb_filename. 5) Make is_ntfs_stream_name() a constant operation that can simply check the state of struct smb_filename rather than re-parse the filename. 6) Eliminate the need for split_ntfs_stream_name() to exist. My strategy is to start from the inside at unix_convert() and work my way out through the vfs layer, call by call. This first patch does just that, by changing unix_convert and all of its callers to operate on struct smb_filename. Since this is such a large change, I plan on pushing the patches in phases, where each phase keeps full compatibility and passes make test. The API of unix_convert has been simplified from: NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn, const char *orig_path, bool allow_wcard_last_component, char **pp_conv_path, char **pp_saved_last_component, SMB_STRUCT_STAT *pst) to: NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn, const char *orig_path, struct smb_filename *smb_fname, uint32_t ucf_flags) Currently the smb_filename struct looks like: struct smb_filename { char *base_name; char *stream_name; char *original_lcomp; SMB_STRUCT_STAT st; }; One key point here is the decision to break up the base_name and stream_name. I have introduced a helper function called get_full_smb_filename() that takes an smb_filename struct and allocates the full_name. I changed the callers of unix_convert() to subsequently call get_full_smb_filename() for the time being, but I plan to eventually eliminate get_full_smb_filename().
2009-05-13s3-printing: no need to define struct table_node 4 times.Günther Deschner1-7/+1
Guenther
2009-05-13s3-spoolss: move SPL_ARCH_X defines to IDL.Günther Deschner1-8/+0
Guenther
2009-05-12s3-printing: Fix vlp testprinter application.Günther Deschner1-24/+23
Jeremy, we cannot just access cache_path() here without calling lp_load and friends as well as parsing configfile from the commandline in order to make "make test/selftest" find the correct conffile with path, etc. I just changed it to pass the target tdbfilename as an argument, ok ? Guenther
2009-05-11Hopefully fix the buildfarm. Add some debug level 10 messagesJeremy Allison2-5/+20
I used to track down the vlp problem, change the vlp test printer not to use a static path of /tmp/vlp.tdb for the virtual print database (as this will eventually fill up). Cause it to use a virtual print database inside the cachepath. Jeremy.
2009-05-06s3-printing: simplify print_queue helper functions and return WERROR.Günther Deschner1-17/+10
Guenther
2009-04-30s3-printing: rework move_driver_file_to_download_area() a bit for clarity.Günther Deschner1-32/+40
Guenther
2009-04-30s3-printing: use move_driver_file_to_download_area() to avoid code duplication.Günther Deschner1-144/+54
Guenther
2009-04-30s3-printing: add move_driver_file_to_download_area().Günther Deschner1-0/+40
Guenther
2009-04-27s3:nt_printing: fix a comment typoMichael Adam1-1/+1
Michael
2009-04-27s3:registry: replace typedef REGISTRY_VALUE by struct regval_blobMichael Adam1-4/+4
Michael
2009-04-27s3:registry: replace typedef REGVAL_CTR by struct regval_ctr.Michael Adam1-9/+9
This paves the way for hiding the typedef and the implementation from the surface. Michael
2009-04-20Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() ifJelmer Vernooij1-1/+1
the system one is broken.
2009-04-20s3-printing: use ARRAY_SIZE() macro in forms functions.Günther Deschner1-6/+5
Guenther
2009-04-20s3-printing: use sec_initial_uid() instead "0" in print_access_check().Günther Deschner1-1/+1
Another babystep in order to make us pass RPC-SPOOLSS. Guenther
2009-04-14s3-spoolss: remove unused dup_nt_devicemode().Günther Deschner1-28/+0
Guenther
2009-04-07s3-libads: avoid NULL talloc context with ads_get_dn().Günther Deschner1-1/+1
Guenther
2009-04-06s3:libads Make ads_get_dn() take a talloc contextAndrew Bartlett1-2/+2
Also remove ads_memfree(), which was only ever a wrapper around SAFE_FREE, used only to free the DN from ads_get_ds(). This actually makes libgpo more consistant, as it mixed a talloc and a malloc based string on the same element. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-06s3:printing Convert nt_printer_publish_ads() to use talloc betterAndrew Bartlett1-26/+18
In particular, this removes one more user of pull_utf8_allocate() Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
2009-03-30s3/cups: add encryption supportBjörn Jacke1-0/+5
2009-03-20s3-spoolss: apply some const in spoolss server.Günther Deschner1-4/+7
Guenther
2009-03-18s3-spoolss: use printer and job notify enums provided by idl.Günther Deschner1-15/+15
Guenther
2009-03-18s3-printing: use marshall/unmarshall_sec_desc_buf in sec_desc_upg_fn().Günther Deschner1-26/+5
Guenther
2009-03-18s3:printing: use tevent_loop_wait() instead of manual loopingStefan Metzmacher1-50/+6
metze
2009-03-18s3:printing: use a fd event to monitor the pipe to the parentStefan Metzmacher1-3/+23
metze
2009-03-17s3-spoolss: rename temporary convert_devicemode_new function.Günther Deschner1-12/+13
Guenther
2009-03-17s3-spoolss: remove obsolete get_a_builtin_ntform.Günther Deschner1-7/+0
Guenther
2009-03-12s3-spoolss: make jobname a const char * in print_job_start().Günther Deschner1-1/+1
Guenther
2009-03-01Only copy sharename up from rap_to_pjobidVolker Lendecke2-3/+4
Why?? :-) Another one of the little micro-optimizations that I just came across: If you allocate a variable in a sub-block like the "fstring sharename" in write_file(), gcc even with -O3 will allocate this variable unconditionally on the stack at the beginning of the routine. So with eliminating this fstring we cut 256 bytes of stack in a very hot code path writing to a file. It might make us a bit more cache-friendly. This would probably not be worth a second look if it involved larger code changes, but this one was just too simple to let it pass :-)
2009-02-27s3-spoolss: use DSPRINT flags instead of SPOOLS_DS flags.Günther Deschner1-6/+6
Guenther
2009-02-26s3: fix the build JOB_STATUS_BLOCKED -> JOB_STATUS_BLOCKED_DEVQMichael Adam1-1/+1
Günther, please check... Michael
2009-02-25Fix some NetBSD warnings.Jeremy Allison1-2/+4
Jeremy.
2009-02-24s3-spoolss: use marshall/unmarshall_sec_desc_buf in nt_printing_setsec/getsec.Günther Deschner1-45/+35
Guenther
2009-02-24s3-spoolss: fix notify_printer_status_byname.Günther Deschner1-1/+3
This took me almost a week to find, so here a little longer explanation: When a windows client registers printer *status* change notifies using spoolss_RemoteFindFirstChangeNotify, it registers them to a print server handle, not a printer handle. We were then correctly monitoring the printer status changes but were sending out the spoolss_RouterReplyPrinterEx via the back-channel connection with job_id set to 0 (which we only may do for monitored printer change status notifies on printer handlers, not print server handles). Windows was then showing a new empty dummy printer icon in the explorer as it cannot route the notify event to the approriate local handle. It also discarded the content of the notify event message of course. With this, printer change notify for pausing, resuming and purging printers nicely works again here. Jerry, Tim and all other printing gurus, please check. Guenther
2009-02-19Fix printf warnings found on systems where time_t <> long int.Jeremy Allison1-1/+1
Jeremy.
2009-02-18S3: Stop creating SMBD cores when failing to create a pipe.todd stecher1-3/+7
This was uncovered when the MAX FD limit was hit, causing an instant core and invoking error reporting. This fix causes SMBD to exit, but without building a core.
2009-02-13Fix Coverity ID 740 (RESOURCE_LEAK)Volker Lendecke1-0/+2
2009-02-10s3-spoolss: remove more whitespace.Günther Deschner1-135/+135
Guenther
2009-02-09s3-spoolss: remove whitespace in printing code.Günther Deschner1-322/+322
Guenther
2009-02-09s3-spoolss: restore delete_a_form().Günther Deschner1-10/+1
Guenther
2009-02-09s3-spoolss: use pidl for _spoolss_SetForm.Günther Deschner1-12/+10
Guenther
2009-02-09s3-spoolss: use pidl for spoolss_AddForm.Günther Deschner1-15/+13
Guenther
2009-02-07s3-spoolss: rework some form functions and add form_by_string functions.Günther Deschner1-10/+21
Guenther
2009-01-27s3:smbd: use signal events for SIGTERM, SIGHUP and SIGCHLDStefan Metzmacher1-15/+3
metze
2009-01-22s3:printing: make some functions static and use tevent functionsStefan Metzmacher1-8/+12
metze
2009-01-22s3:printing: handle tevent_context events in the sys_select() callStefan Metzmacher1-16/+42
metze
2009-01-16s3: put printing/ under cache_dir, not lock_dirMichael Adam3-4/+4
Michael
2009-01-05Attempt to fix crash seen with new CUPS async printcap loading code.Jeremy Allison1-0/+3
Jeremy.
2009-01-05Merge branch 'master' of ssh://git.samba.org/data/git/sambaJelmer Vernooij3-4/+5
2009-01-05s3:events: change event_add_timed() prototype to match samba4Stefan Metzmacher1-2/+1
metze