1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

305 Commits

Author SHA1 Message Date
Gerald Carter
ac42cd59f2 r9086: * fix invalid read in parse_spoolss when writing a devmode to
the wire
* fix dup_a_regval() when size is 0
* ensure we pass a pstring to unlink_internals (fixes delete_driver
  code)
(This used to be commit 353e63ff42)
2007-10-10 11:00:25 -05:00
Gerald Carter
ef0e98b757 r8543: merge volker's nt_printing_init() fix from trunk (r8526)
but make sure to write the new version to the ntdrivers.tdb.
(This used to be commit 9e50d696c3)
2007-10-10 11:00:08 -05:00
Gerald Carter
6fe5451543 r8501: * disable printer handle object cache (was mostly used
for NT4 clients enumerating printer data on slow CPUs)
* fix pinter and secdesc record upgrade to normalize the key
  (rev'd printer tdb version)
* fixed problem that was normalizing the printername name field

in general, this should fix the issues upgrading print servers
from 3.0.14a to 3.0.20
(This used to be commit d07179de2f)
2007-10-10 11:00:06 -05:00
Jeremy Allison
af8a691db1 r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the torture
tests on this as it's very late NY time (just wanted to get this work
into the tree). I'll test this over the weekend....
Jerry - in looking at the difference between the two trees there
seem to be some printing/ntprinting.c and registry changes we might
want to examine to try keep in sync.
Jeremy.
(This used to be commit c7fe18761e)
2007-10-10 10:58:18 -05:00
Gerald Carter
22ea1952c8 r8089: successfully delete printer subkeys via the registry....now for values
(This used to be commit d3427960b0)
2007-10-10 10:58:10 -05:00
Gerald Carter
c296f858ef r8066: * had to modify the printer data storage slightly in ntprinters.tdb
when packing values.  It is a compatible change though and will
  not require a tdb version upgrade
* Can successfully create new printer subkeys via winreg that
  are immediately available via spoolss calls.  Still cannot delete
  keys yet though.  That comes next.
(This used to be commit 00bce2b3bb)
2007-10-10 10:58:10 -05:00
Gerald Carter
9ef00c5b1b r8025: *how* can this code have been around so long and
nver normalized the string used for printer and
sec_desc key lookups ?????

normalized sharename to lower case before storing/fetching
from tdb.

Need to look at drivers and forms tdb as well (perhaps).
(This used to be commit 4aec5dce5c)
2007-10-10 10:58:09 -05:00
Gerald Carter
e2b9dfd60b r7983: clean up some use of un-initialized variables found by valgrind
(This used to be commit 5f4a3f61a3)
2007-10-10 10:58:06 -05:00
Jeremy Allison
19ca97a70f r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
(This used to be commit 9506b8e145)
2007-10-10 10:58:00 -05:00
Gerald Carter
fee4b03e02 r7692: start versioning the registry.tdb file since it can be modified now
(This used to be commit a091b37d59)
2007-10-10 10:57:19 -05:00
Gerald Carter
2129d3c711 r7691: * add .gdbinit to the svn:ignore files
* start adding write support to the Samba registry
  Flesh out the server implementations of
  RegCreateKey(), RegSetValue(), RegDeleteKey() and RegDeleteValue()

I can create a new key using regedit.exe now but the 'New Key #1'
key cannot be deleted yet.
(This used to be commit e188fdbef8)
2007-10-10 10:57:19 -05:00
Gerald Carter
e9e00ee9c2 r7620: when adding a new printer driver, we should copy the files
(not move) to the W32X86/{2,3}/ directory.  Printmig.exe
copies the driver files for all drivers to print$/W32X86
and the calls AddPrinterDriver() for each driver.  If we
move the file, then adding a driver which shares a file with
a previous driver will fail.

I can now restore drivers in bulk to a Samba 3 server.
(This used to be commit 46cd95c9b4)
2007-10-10 10:57:17 -05:00
Gerald Carter
f2f115c2a2 r7614: convert move_driver_to_download_area() to return WERROR in order to provide better error messages to clients when a AddPrinterDriver[Ex]() call fails
(This used to be commit c98e17446a)
2007-10-10 10:57:16 -05:00
Gerald Carter
9591510721 r7584: cleanup the default printer security descriptor
(This used to be commit 26387fc74c)
2007-10-10 10:57:15 -05:00
Jeremy Allison
ed5e7ff9f1 r7200: Don't use memset, use SET_STAT_INVALID (has the same effect).
Jeremy.
(This used to be commit 0b6f87d5e1)
2007-10-10 10:57:05 -05:00
Gerald Carter
eb8b02104e r7041: compile fixes....long day I guess
(This used to be commit ec3ef5ddbe)
2007-10-10 10:57:01 -05:00
Gerald Carter
4b417655f7 r7038: * upgrade version of nt*tdb files. Have to fix
some issues in the printer security descriptors.
  Ensure that each printer sd has an oaner and group SID
  (BUILTIN\Administrators) and that we utilize more than
  the generic bits assigned in <= 3.0.14a.
(This used to be commit c72182c1e2)
2007-10-10 10:57:01 -05:00
Volker Lendecke
83e11ba86c r6263: Get rid of generate_wellknown_sids, they are const static and initializable
statically.

Volker
(This used to be commit 3493d9f383)
2007-10-10 10:56:33 -05:00
Herb Lewis
978ca84860 r6225: get rid of warnings from my compiler about nested externs
(This used to be commit efea76ac71)
2007-10-10 10:56:30 -05:00
Jeremy Allison
cc5ba986bf r5792: Added new parameter "inherit owner". If set on a share, the created 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 2e1f727184)
2007-10-10 10:56:01 -05:00
Gerald Carter
aaa4a660ac r5683: BUG 2363: allow 'in use' driver to be removed as long as one 'Windows NT x86' driver remains'
(This used to be commit 743ddbc7f2)
2007-10-10 10:55:54 -05:00
Gerald Carter
3bb69bc8ef r5029: after talking to Rob, ensure that we set the NETIOSNAME.domainname
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 d64fd1116d)
2007-10-10 10:55:12 -05:00
Gerald Carter
3947f33ec5 r4874: add DOmain Admins (Full Control) to the default printer sd if we are a DC
(This used to be commit 8971a85442)
2007-10-10 10:55:06 -05:00
Gerald Carter
46e5effea9 r4805: Last planned change to the privileges infrastructure:
* 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 41dc7f7573)
2007-10-10 10:53:55 -05:00
Gerald Carter
2c33c41b0c r4740: allow SE_PRINT_OPERATORS to have printer admin access
(This used to be commit 85731706c9)
2007-10-10 10:53:53 -05:00
Gerald Carter
d097ea4905 r4539: patch from Rob -- adding real printcap name cache function to speed up printcap reloads
(This used to be commit 1cad525093)
2007-10-10 10:53:46 -05:00
Gerald Carter
7ab25a7ae1 r4089: fix logic error in add_a_form() that only compared N characters instead of the entire form name
(This used to be commit e3decbc441)
2007-10-10 10:53:32 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our 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 620f2e608f)
2007-10-10 10:53:32 -05:00
Jim McDonough
3e8e24c629 r3727: Update from Rob Foehl (rwf@loonybin.net):
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 82eb168c82)
2007-10-10 10:53:16 -05:00
Gerald Carter
5c27f5fbc3 r3710: fix another safe_strcpy() warning SPAM with the printer drivcename
(This used to be commit 5eac16464d)
2007-10-10 10:53:15 -05:00
Gerald Carter
f3ea955b70 r3707: 2028: avoid false error messages when copying a long printer name to the device mode
(This used to be commit c9613214a5)
2007-10-10 10:53:15 -05:00
Gerald Carter
4e18fa46d5 r3069: add 'force printername' service parameter for people that want to enforce printername == sharename for spoolss printing
(This used to be commit d47b8a0b4f)
2007-10-10 10:53:00 -05:00
Gerald Carter
c53e6401eb r3049: fixing some calls in the printing code to stanard_sub_basic(); fix standard_sub_snum() to use the current user's gid; add some (snum == -1) checks to standard_sub_advanced()
(This used to be commit 8c3fd1908d)
2007-10-10 10:52:59 -05:00
Gerald Carter
534c4a2504 r2996: readability fix for length check; no semantic changes
(This used to be commit 668ab6984a)
2007-10-10 10:52:58 -05:00
Gerald Carter
7df1ed060b r2955: fixing a segfault uncovered by the changes for BUG 1519
(This used to be commit 1664395257)
2007-10-10 10:52:57 -05:00
Günther Deschner
2d016a67b8 r2821: Adding "Windows x64" as architecture string and driverdir "x64" for the
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 cc5892f041)
2007-10-10 10:52:53 -05:00
Gerald Carter
31441aaa13 r2768: BUG 1519: save the hostname used in the open_printer_ex() for later reuse when filling in the spolss replies (also gets rid of get_called_name()
(This used to be commit 57db8ca91f)
2007-10-10 10:52:52 -05:00
Gerald Carter
729155a428 r2570: minor fix with Rob's patch. use dos_errstr() instead of W_ERROR_V() when using %s in the format string
(This used to be commit b26e4dbd7f)
2007-10-10 10:52:46 -05:00
Gerald Carter
5a8effaaae r2569: Patch from Rob Foehl <rwf@loonybin.net>:
- 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 50a5a3dbd0)
2007-10-10 10:52:46 -05:00
Gerald Carter
278f9467f2 r2133: Several fixes:
* 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 7474c6a446)
2007-10-10 10:52:32 -05:00
Gerald Carter
1842fde7d1 r1885: tighten the cache consistency with the ntprinters.tdb entry an the in 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 540daf71d8)
2007-10-10 10:52:23 -05:00
Günther Deschner
60727acc3b r1692: first commit :)
* 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 8f1716a29b)
2007-10-10 10:52:19 -05:00
Jeremy Allison
2fc57c9a2c r1085: Now it's had some proper user testing, merge in the deferred open 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 894cc6d162)
2007-10-10 10:51:54 -05:00
Gerald Carter
509c71fef5 r783: fix bug in reading printer data from disk; all ow valuenames with embedded '\'s
(This used to be commit fdc1633c34)
2007-10-10 10:51:38 -05:00
Gerald Carter
0f462790a3 r689: removed unneeded forward declarations
(This used to be commit ae0a770d60)
2007-10-10 10:51:34 -05:00
Gerald Carter
72d124af9e r551: BUG 1293: fix double free in printer publishing code
(This used to be commit f9a371f33b)
2007-10-10 10:51:28 -05:00
Gerald Carter
5254c9b6b4 r543: possible fix for BUG 1293 -- initialize pointer to NULL to ensure the failure check is valid
(This used to be commit b7005e6989)
2007-10-10 10:51:28 -05:00
Jeremy Allison
683d27ff1e r460: Fix for broken driver upload/delete path processing.
Jeremy.
(This used to be commit 78be46d13b)
2007-10-10 10:51:24 -05:00
Gerald Carter
8ad3d8c9b0 r196: merging struct uuid from trunk
(This used to be commit 911a28361b)
2007-10-10 10:51:13 -05:00
Jeremy Allison
722aa118c6 Added per-share parameter "store dos attributes". When set, will store
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 ed653cd468)
2004-04-02 18:46:19 +00:00