1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

747 Commits

Author SHA1 Message Date
Tim Potter
64299375b5 Moved winbind client functions from various odd locations to
nsswitch/wb_client.c

Merge of nsswitch/common.c rename to nsswitch/wb_common.c from TNG.
(This used to be commit f866c18f6be65db67d9d2a6c0b42e1af3b421e6c)
2000-07-10 05:40:43 +00:00
Tim Potter
78a4848e8d Re-instated lanman printing security checks (oops).
A user can now pause, resume or delete their own job even if they don't
have the Manage Documents privilege.

Added call to se_access_check() for changing printer properties.  The Full
Access privilege is required for the user to perform this.

Several uninitialised variables and memory leaks plugged.

Modified default ACL created on new printers to be Everyone / Print instead
of Everyone / Full Access.  This required some random stuffing around with
the value of the revision field to correspond with the ACL that NT produces
when setting the same permission on the printer.

Fixed dodgy function call in printing/printfsp.c
(This used to be commit 2abce4dcfa351051df6e5f789b34fa99c9b81c22)
2000-07-10 05:08:21 +00:00
Jeremy Allison
89eafd3cef printing/nt_printing.c: (From JF) use the driver name - already given to us.
printing/printing.c: priority needs to be 1 not zero (found by checked build).
rpc_server/srv_spoolss_nt.c: Log invalid handle access, also print out if this is a different
							pid handle. This will help track down client access after a connection
							is closed.
Jeremy.
(This used to be commit 4ff949228c40b6abb2008df8db985562ac2895d2)
2000-07-06 23:31:46 +00:00
Tim Potter
75dd5b5051 Don't check NT permissions when printing from lanman.
(This used to be commit e84607eedf3be454f8f709c70cafc5ded4ea951d)
2000-07-06 07:10:32 +00:00
Tim Potter
957aa91e9e Implemented NT printer descriptor checking. Yay!
User details are passed into the printing back end from the spoolss code.
For each print operation these details are checked using the
se_access_check() function using information from the winbind daemon.

Fixed bug in nt_printing_setsec() where the user and group SIDs were
trashed if the permissions were changed from NT.  It is necessary to merge
these sids from the previous value of the security descriptor before
storing it in the tdb.
(This used to be commit 8d42661d424d80e1048d08b5cad3281643231d62)
2000-07-06 07:06:05 +00:00
Jean-François Micouleau
104217f3b0 Found that the minimum priority is 1 and not 0 on NT.
Changed back the devicemode's devicename to "\\server\printer".

I'm 100% sure it is correct, it's what NT sends on the wire. And that's
the printer's name and NOT the port's name as it has to be unique. It must
also be a UNC because it's a remote printer (remote for the client).

        J.F.
(This used to be commit a7098c47b6ecbd7bb5df1330ea176aa4d463aad3)
2000-07-01 09:34:37 +00:00
Jeremy Allison
774b06ee21 Tidy up current spool code - added some JRATEST ifdefs to allow
experimentation with what is making spoolss.exe crash - may be removed
later.
Jeremy.
(This used to be commit f3fe384dc39ce49c639a7adf35179a50cb86abf0)
2000-06-29 00:52:40 +00:00
Jeremy Allison
36fd3866ef Changing drivers using the properties page works - but only if getting/setting
security descriptors is disabled (as it is in this code).

If get/set sd's is enabled spooler.exe crashes on NT.

I'll investigate and fix that issue next.

Jeremy.
(This used to be commit 8c9ed874363e6a710bc0fe521bb8c4f7ee219587)
2000-06-26 22:08:20 +00:00
Tim Potter
096127fb47 Some compile fixes.
(This used to be commit 4d0c09cb4f17b60ab99767d3e61f2ad50c6c5c30)
2000-06-23 06:47:11 +00:00
Jeremy Allison
f9e9f98a4a lib/util_unistr.c: Removed ascii_to_unistr() as it does no codepage.
Removed unistr_to_ascii() as it was never used.
printing/nt_printing.c: Removed "DUMMY.XX" files.
rpc_server/srv_spoolss_nt.c: Use dos_PutUniCode() instead of ascii_to_unistr().
							Attempted to fix the "return value" size code based on J.F's
							comments. This needs looking at.
Jeremy.
(This used to be commit de99011bf3b2a23bd1854a047382a107aaeb9c68)
2000-06-22 01:39:17 +00:00
Jeremy Allison
69c75c8a16 Fixes for Win2k "add printer driver" INFO_LEVEL_6 was wrong, also some
memory fixes.
Jeremy.
(This used to be commit 2a9e645cbddef1cddc5c978310b7efed492758d2)
2000-06-20 23:58:56 +00:00
Tim Potter
a72c9e2080 Pass the vuid from the connection_struct to the printing back end functions.
(This used to be commit a8975d6e226e7271f60d5487243301db3c220d87)
2000-06-16 08:24:45 +00:00
Tim Potter
ccc32898cf Call print_access_check() function from printing back end.
(This used to be commit 979e083d3dd844b98b03108e636dfe11ae157fb0)
2000-06-16 08:21:51 +00:00
Tim Potter
a1a0f7e1e5 Added print_access_check() function for checking printer security
descriptors.  Currently returns True (plus debug output) which should not
affect the behaviour of nt or lanman printing.
(This used to be commit a9b4710e649e887e07d68c1bf826e00c9811e4ee)
2000-06-16 08:20:44 +00:00
Jean-François Micouleau
0288a641e7 untiltime should be 0 by default to cover the whole 24 hours.
J.F.
(This used to be commit 53aff484a6a37c83fd2e21d48fd1a5fcbad2f511)
2000-06-09 14:08:03 +00:00
Luke Leighton
6ac5383233 make_sec_acl was passed pointer to static array ace[2], oops.
(This used to be commit f3502d846c99c77b13ce75977f5dc79cc1a3506d)
2000-06-08 07:55:24 +00:00
Jeremy Allison
b2eef912cf Cause printer SD's to be displayed correctly (full control).
Jeremy.
(This used to be commit 341d07c516865bdd9be99f98cd0754d12b25f9c0)
2000-06-08 00:17:05 +00:00
Jeremy Allison
0164047afb Fixing get/set of security descriptors.
Removed ugly hack for NT printing.
Fixed up tdb parse stuff memory leaks.
Jeremy.
(This used to be commit 8ef41f31c53e14ad057d883810a1cd2301fede2a)
2000-06-07 01:49:23 +00:00
Andrew Tridgell
798670db20 fixed sizeof() typo
(This used to be commit 1da9c5531a8e26dc63b31a27fa73e0932278acb4)
2000-06-06 01:53:05 +00:00
Andrew Tridgell
ad53b64641 fixed!!
yipee!

the damn "device settings cannot be displayed" error is gone. We
needed to supply a default set of forms. I've added A4 and Letter by
default.
(This used to be commit 36f1189be1609490b6a825a2608b9cf5dc682656)
2000-06-06 01:47:11 +00:00
Jeremy Allison
84aa9ad049 Create elements in default, not in read.
Jeremy.
(This used to be commit 0d681ea252e0cf7fdf57d316d2bfe7caa9b4fbf5)
2000-06-06 01:34:20 +00:00
Andrew Tridgell
c35ea64561 fixed a off by one bug in ntforms read from the database
(This used to be commit 1c5f70821981e961b81c31f5c83bb56c08ef5018)
2000-06-05 11:45:56 +00:00
Andrew Tridgell
dcecbc52a9 we no longer need the code to cope with setprinter having corrupted
data
(This used to be commit c602b703a05b94748a890add751f47fc6b539c60)
2000-06-04 23:44:33 +00:00
Andrew Tridgell
7ed09de569 some printer parameters are getting corrupted, possibly by the client
possibly by smbd. Reset them so printing at least works while I try to
figure out what is going on.
(This used to be commit 70476d6767a571460fa375fb1dae884df77ca143)
2000-06-04 04:17:59 +00:00
Andrew Tridgell
ad267718dd fixed the pack/unpack of the devicemode
we were being bitten by uint16/uint32 mixups
(This used to be commit 1d37f76953534f7bf9d8890dda30c7e00cbb024c)
2000-06-04 02:29:00 +00:00
Andrew Tridgell
5a0d520723 someone forgot a !
(This used to be commit 29fa2e1d99235bc15b2916c404b46012eb77b7e2)
2000-06-04 00:08:50 +00:00
Andrew Tridgell
2a24646c50 fixed some ptr declarations
(This used to be commit 7a670f5f3b627543bf776fc9698a2b5d46c110a3)
2000-06-03 07:20:44 +00:00
Andrew Tridgell
843120837c added %J and %T to run_print_command()
made the run_print_command a varargs fn
(This used to be commit b9f2cf459322fb3f10844f9441633c7bcd6ed151)
2000-06-03 06:18:43 +00:00
Jeremy Allison
2472ab1e60 More memory corruption (leaks etc.) fixes.
Jeremy.
(This used to be commit 71a0621f552083880e89923055e8bd14d0b1b82f)
2000-06-02 19:42:11 +00:00
Jeremy Allison
8ff6458a3e More insure found memory leak and corruption fixes.
Jeremy.
(This used to be commit 3cdcfa6325b9cd2d7f7c90c4b2d1c6ec73fc2f6d)
2000-06-01 21:52:49 +00:00
Jeremy Allison
b9fedcb2de param/loadparm.c: Looks like someone ran indent on this !
passdb/smbpass.c: Insure uninitialized memory reference fix.
printing/nt_printing.c:
rpc_server/srv_spoolss_nt.c: Insure memory leak fixes.
smbd/unix_acls.c: Shadow ref fix.
Jeremy.
(This used to be commit d175d3ebefc053e9badd91ca5f2d8bd03eb6705d)
2000-06-01 21:00:37 +00:00
Jeremy Allison
61ab5b46cf Back to building. Now to test with insure.
Added some frees needed to stop memory leaks.
Jeremy.
(This used to be commit eba31e4e802120c9eb8c4688f521b4de9cb91f5c)
2000-06-01 18:17:22 +00:00
Jeremy Allison
f0080e5a39 Getting back to a compilable state (not there yet but close).
Added patches for random -> sys_random.
Added set_effective_xxx patches for AFS code.
Memory allocation changes in spoolss code.
Jeremy.
(This used to be commit c2099cfb033c2cdb6035f4f7f50ce21b98e1584d)
2000-06-01 17:01:34 +00:00
Andrew Tridgell
23d705672e if the tdb stored driver isn't formatted right then return a default
driver
(This used to be commit 48bf12d23ee39ccc7c19363012abd48f43dfac11)
2000-05-29 01:28:33 +00:00
Andrew Tridgell
2d066492d5 fixed a couple of bugs in the driver return code
(This used to be commit 8695cb0023597fd118241a431eeeddc559484465)
2000-05-28 22:50:30 +00:00
Andrew Tridgell
5f7c40f6d0 getting and setting security descriptors on printers now works
this needed some fixes in tdb_unpack(). Tim, you'll need to update
(This used to be commit 9422719ab4c35e4ce3199b62dd632433bf391283)
2000-05-27 09:53:11 +00:00
Andrew Tridgell
9fb4575047 fixed return from nt_printing_init()
(This used to be commit 7e13ba75444eb82b257a7a3578aa30ae2f52fe1a)
2000-05-27 07:27:21 +00:00
Andrew Tridgell
b6ecd4fbe2 fixed call of firstkey/nextkey to traverse driver database
(This used to be commit 11010f946af4d60d88bed450692e43c6a7860ab7)
2000-05-27 03:37:05 +00:00
Luke Leighton
b673d5f797 dummy trash in secdesc.
(This used to be commit 56c2dbbf813e1dc120d199b173fd462c658572a0)
2000-05-27 02:27:44 +00:00
Luke Leighton
e01fb48737 bug-fix from tim (insure). dummy fn call for andrew to fill in.
(This used to be commit 1e3c0ab29d178fe58add32672301ac497d43a3fe)
2000-05-27 02:15:08 +00:00
Luke Leighton
a65dead017 security descs in spoolss. needs parse_sec.c nttrans.c broken.
(This used to be commit f9f2a04fdb7b2af1cfe5bf26ec6f0d955ea948b9)
2000-05-27 01:26:34 +00:00
Andrew Tridgell
a95efec534 a fairly big change in spoolss.
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-24 06:10:21 +00:00
Andrew Tridgell
0806cf75ff added spool_io_printer_driver_info_level_6()
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-12 14:28:46 +00:00
Tim Potter
4cdc54ba24 While we're all making incompatible tdb changes, I changed the implementation
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-12 06:27:35 +00:00
Andrew Tridgell
e48b4ec4c5 fail a print start on a deleted auto printer
(This used to be commit f1f92bf4da75ec6fccd34b07719d642196665258)
2000-05-10 11:49:06 +00:00
Andrew Tridgell
49a0e6d598 more merging voodoo
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-10 10:41:59 +00:00
Andrew Tridgell
f3a861e04e - use full_name instead of real_name
- got rid of guest map code in lpq parser
(This used to be commit 8e53f781d3cf6a7007764916a0d8e8f1abea1f66)
2000-05-04 07:59:34 +00:00
Andrew Tridgell
59fa2dbe2c added support for deleting printers into the spoolss system
(This used to be commit e72a5718537b84409fc20ff21951b1d1ab24d97f)
2000-05-02 15:31:55 +00:00
Jeremy Allison
693ffb8466 Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid.
Jeremy.
(This used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a)
2000-05-02 02:23:41 +00:00
Andrew Tridgell
5fb473fc75 handle tabs in printcap files
this is needed for lprng
(This used to be commit c40e0a5d3bfa11cb3699bdba1ded91515cabaf5d)
2000-05-01 05:42:39 +00:00