summaryrefslogtreecommitdiff
path: root/source3/printing/nt_printing.c
AgeCommit message (Collapse)AuthorFilesLines
2010-05-31s3-build: only use ndr_security.h where needed.Günther Deschner1-0/+1
Guenther
2010-05-25s3:registry: move reg_objects.h to registry/ and use it only where neededMichael Adam1-0/+1
Every place outside of registry/ where this is used, should probably be changed to use pure reg_api.c code.
2010-05-25s3:nt_printing: use regval_ctr_init().Michael Adam1-1/+4
2010-05-25s3:registry: adapt callers of regval_ctr_addvalue to uint8 * instead of char *Michael Adam1-4/+4
2010-05-21s3:dom_sid Global replace of DOM_SID with struct dom_sidAndrew Bartlett1-6/+6
This matches the structure that new code is being written to, and removes one more of the old-style named structures, and the need to know that is is just an alias for struct dom_sid. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18s3-spoolss: Added EN ISO 216, A0 and A1 to builtin forms.Andreas Schneider1-0/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18s3-spoolss: Removed the Phantom DeviceMode.Simo Sorce1-378/+0
This was a hack that required a special client from HP. The client code has never been released and was discontinued, so this code was just dead weight. Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18s3-spoolss: Create a spoolss_map_to_os2_driver function.Andreas Schneider1-0/+104
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18s3-spoolss: Use better names for set_last_from_to.Andreas Schneider1-23/+20
Use set_driver_mapping() and get_win_driver(), get_os2_driver(). Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18s3-secdesc: use SD_REVISION from security.idl.Günther Deschner1-3/+3
Guenther
2010-05-18s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".Günther Deschner1-8/+8
Guenther
2010-05-18s3-secdesc: remove "typedef struct security_acl SEC_ACL".Günther Deschner1-4/+4
Guenther
2010-05-18s3-secdesc: remove "typedef struct security_ace SEC_ACE".Günther Deschner1-2/+2
Guenther
2010-05-18s3-secdesc: remove "typedef struct sec_desc_buf SEC_DESC_BUF".Günther Deschner1-12/+12
Guenther
2010-05-18s3: Remove use of iconv_convenience.Jelmer Vernooij1-3/+3
2010-05-18s3-registry: only include registry headers when really needed.Günther Deschner1-0/+1
Guenther
2010-05-18s3-rpc_misc: clean out include/rpc_misc.h.Günther Deschner1-5/+5
Well known rids don't really belong into an rpc header, just use the ones defined in security.idl. Guenther
2010-05-14Make pcap headers privateSimo Sorce1-0/+1
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-06s3: only include gen_ndr headers where needed.Günther Deschner1-0/+1
This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
2010-05-05s3-spoolss: Added a generic spoolss_create_default_secdesc function.Andreas Schneider1-0/+84
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-05s3-spoolss: Added a function to create a default spoolss_DeviceMode.Andreas Schneider1-0/+77
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-04s3-lib: Create a sec_desc_merge and sec_desc_merge_buf function.Andreas Schneider1-1/+1
Signed-off-by: Günther Deschner <gd@samba.org>
2010-04-23s3-spoolss: Move info_ctr conversion to a public helper.Simo Sorce1-6/+23
Signed-off-by: Günther Deschner <gd@samba.org>
2010-04-23s3-spoolss: fix some crash bugs and missing error codes in AddDriver paths.Günther Deschner1-2/+8
Found by torture test. Guenther
2010-04-09s3: add iconv_convenience handle to pull/push sz helpers.Günther Deschner1-1/+1
Guenther
2010-04-07s3-spoolss: Fix an issue in _spoolss_DeleteForm.Günther Deschner1-1/+1
Found by torture test. Guenther
2010-03-26s3-printing: avoid mixing cups backend code with nt_printing code in ↵Günther Deschner1-4/+22
cups_pull_comment_location. Guenther
2010-03-18s3-printing: Fix "printer admin" functionality.Jeremy Allison1-1/+1
Fix bug #7255 ("printer admin" parameter does not work as expected).
2010-03-10s3: Fix a long-standing problem with recycled PIDsVolker Lendecke1-1/+1
When a samba server process dies hard, it has no chance to clean up its entries in locking.tdb, brlock.tdb, connections.tdb and sessionid.tdb. For locking.tdb and brlock.tdb Samba is robust by checking every time we read an entry from the database if the corresponding process still exists. If it does not exist anymore, the entry is deleted. This is not 100% failsafe though: On systems with a limited PID space there is a non-zero chance that between the smbd's death and the fresh access, the PID is recycled by another long-running process. This renders all files that had been locked by the killed smbd potentially unusable until the new process also dies. This patch is supposed to fix the problem the following way: Every process ID in every database is augmented by a random 64-bit number that is stored in a serverid.tdb. Whenever we need to check if a process still exists we know its PID and the 64-bit number. We look up the PID in serverid.tdb and compare the 64-bit number. If it's the same, the process still is a valid smbd holding the lock. If it is different, a new smbd has taken over. I believe this is safe against an smbd that has died hard and the PID has been taken over by a non-samba process. This process would not have registered itself with a fresh 64-bit number in serverid.tdb, so the old one still exists in serverid.tdb. We protect against this case by the parent smbd taking care of deregistering PIDs from serverid.tdb and the fact that serverid.tdb is CLEAR_IF_FIRST. CLEAR_IF_FIRST does not work in a cluster, so the automatic cleanup does not work when all smbds are restarted. For this, "net serverid wipe" has to be run before smbd starts up. As a convenience, "net serverid wipedbs" also cleans up sessionid.tdb and connections.tdb. While there, this also cleans up overloading connections.tdb with all the process entries just for messaging_send_all(). Volker
2010-03-05Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.Jeremy Allison1-0/+3
Ensure we don't use any of the create_options for Samba private use. Add a new parameter to the VFS_CREATE call (private_flags) which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code). Rev. the VFS interface to version 28. Jeremy.
2010-01-10s3: Replace most calls to sid_append_rid() by sid_compose()Volker Lendecke1-2/+2
2009-12-08s3-spoolss: use driver level info8 everywhere in spoolss server internally.Günther Deschner1-99/+196
Guenther
2009-12-07s3-spoolss: a default printer should have at least a "PrintDriverData" key.Günther Deschner1-0/+7
Guenther
2009-11-25Fix warnings with talloc_asprintf.Jeremy Allison1-3/+3
Jeremy.
2009-11-23s3-printing: remove duplicate code while cleaning up driver structs.Günther Deschner1-68/+39
Guenther
2009-11-23s3-printing: use spoolss types and structs while getting and deleting drivers.Günther Deschner1-166/+157
Guenther
2009-11-23s3-printing: use spoolss types and structs while adding drivers.Günther Deschner1-275/+167
Guenther
2009-10-01s3-registry: use pull_reg_sz() where appropriate.Günther Deschner1-3/+6
(and move away from rpcstr_pull and rpcstr_pull_talloc). Guenther
2009-09-30s3-printing: use regval_ctr_addvalue_multi_sz.Günther Deschner1-17/+4
Guenther
2009-09-30s3-registry: use regval_ctr_addvalue_sz().Günther Deschner1-22/+6
Greatly simplifies and cleanes up the code. Guenther
2009-09-30s3-registry: use push_reg_sz().Günther Deschner1-15/+9
Guenther
2009-08-10s3-spoolss: remove device mode defines from nt_printing.h.Günther Deschner1-12/+17
Guenther
2009-08-07s3:smbd: conn_free_internal() can be static nowStefan Metzmacher1-3/+3
metze
2009-07-24s3: Convert a few callers of unix_convert() over to filename_convert()Tim Prouty1-5/+23
This patch also changes the unix convert flags to make sure the correct semantics are preservered for allowing/disallowing wildcards in the last component of the path.
2009-06-24s3-printing: eliminate another non sec_initial_uid using security check.Günther Deschner1-1/+1
Guenther
2009-06-15Do a correct TALLOC_FREE in an error caseVolker Lendecke1-1/+4
2009-06-12s3: Plumb smb_filename through SMB_VFS_CREATE_FILETim Prouty1-47/+27
2009-06-10s3: Prepare the first set of SMB_VFS_CREATE_FILE callers to take an ↵Tim Prouty1-53/+95
smb_filename struct Some of the callers required minimal changes, while others (copy_internals) required significant changes. The task is simplified a little bit because we are able to do operations and checks on the base_name when a stream isn't used. This patch should cause no functional changes. Volker, Jeremy: Please check
2009-06-10s3: Remove extraneous calls to unix_convertTim Prouty1-6/+0
Not only are these unnecessary in spirit because unlink_internals calls unix_convert, but in practice the return value is simply being ignored right now.
2009-05-26Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke1-2/+2
This patch introduces struct stat_ex { dev_t st_ex_dev; ino_t st_ex_ino; mode_t st_ex_mode; nlink_t st_ex_nlink; uid_t st_ex_uid; gid_t st_ex_gid; dev_t st_ex_rdev; off_t st_ex_size; struct timespec st_ex_atime; struct timespec st_ex_mtime; struct timespec st_ex_ctime; struct timespec st_ex_btime; /* birthtime */ blksize_t st_ex_blksize; blkcnt_t st_ex_blocks; }; typedef struct stat_ex SMB_STRUCT_STAT; It is really large because due to the friendly libc headers playing macro tricks with fields like st_ino, so I renamed them to st_ex_xxx. Why this change? To support birthtime, we already have quite a few #ifdef's at places where it does not really belong. With a stat struct that we control, we can consolidate the nanosecond timestamps and the birthtime deep in the VFS stat calls. At this moment it is triggered by a request to support the birthtime field for GPFS. GPFS does not extend the system level struct stat, but instead has a separate call that gets us the additional information beyond posix. Without being able to do that within the VFS stat calls, that support would have to be scattered around the main smbd code. It will very likely break all the onefs modules, but I think the changes will be reasonably easy to do.