1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

384 Commits

Author SHA1 Message Date
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 2abce4dcfa)
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 4ff949228c)
2000-07-06 23:31:46 +00:00
Tim Potter
d01839e49e Pass either an authenticated pipe or SMB user in a current_user struct down
to the printing back end functions.
(This used to be commit a2751a269e)
2000-07-06 06:53:47 +00:00
Tim Potter
d4081ac703 Pass pipes_struct rather than vuid down to startdocprinter, setprinter and
setjob spoolss server commands.
(This used to be commit f357451374)
2000-07-06 06:51:55 +00:00
Tim Potter
648f0849d6 Changed checking for WINBINDD_OK return value instead of NSS_STATUS_SUCCESS
when looking up sids from winbindd.
(This used to be commit 79fb877bf1)
2000-07-06 06:47:38 +00:00
Tim Potter
f048209484 Some more sec_ctx changes. Modified some fields in the pipe_struct
structure so authenticated pipe users can have their unix groups set when
become_authenticated_pipe_user() is called.
(This used to be commit 55c9bf124d)
2000-07-03 06:52:31 +00:00
Tim Potter
877c91bfdd Renamed generic_request() to winbindd_request()
(This used to be commit d904195855)
2000-07-03 00:58:13 +00:00
Jean-François Micouleau
2d2b6a46f7 reverting Jeremy's changes to enumprinterdata.
Jeremy, the out_max_value_len and out_max_data_len were good. Your change
is breaking NT4SP6 checked version.

        J.F.
(This used to be commit 5f2be8ba7d)
2000-07-01 16:40:10 +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 a7098c47b6)
2000-07-01 09:34:37 +00:00
Jeremy Allison
eed5e03043 Fixed oops with missing MANGLE_PATH directive.
Jeremy.
(This used to be commit fb6b5a9645)
2000-06-30 01:07:26 +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 f3fe384dc3)
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 8c9ed87436)
2000-06-26 22:08:20 +00:00
Jeremy Allison
990b8e5f7f Fixed display of "Everyone" in SD's.
Jeremy.
(This used to be commit 3c7fdaa576)
2000-06-26 17:41:06 +00:00
Jeremy Allison
ec1c58fcc0 lib/util_sid.c: Uninitialized memory read.
rpc_parse/parse_spoolss.c: Added note about prs_align when marshalling a SEC_DESC...
rpc_server/srv_lsa.c: Tim - your changes broke the display of the 'everyone' group
						when doing file access with no winbindd running. This is a partial
						fix - more when I have analysed this more.
rpc_server/srv_spoolss_nt.c: Fix for the 'change driver' problem ! Hurrah !

Jeremy.
(This used to be commit 151b131ee0)
2000-06-24 00:15:08 +00:00
Tim Potter
be7ad004e0 Got a bit carried away deleting things.
(This used to be commit 211391d88e)
2000-06-23 06:43:08 +00:00
Tim Potter
e1b9e7cfff Removed unused variables.
(This used to be commit a75e738211)
2000-06-23 06:36:22 +00:00
Tim Potter
218653764f Removed save directory argument to become_root() calls. Probably most of
this stuff doesn't need to be done as root anyway.
(This used to be commit c3cad0ff64)
2000-06-23 05:53:18 +00:00
Jeremy Allison
eecab5c660 Changed enumports to show printernames as ports. In line with 'the grand plan' :-)
Gerald & I discussed with HP. More changes to follow.
Jeremy.
(This used to be commit 193a248bed)
2000-06-22 23:59:22 +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 de99011bf3)
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 2a9e645cbd)
2000-06-20 23:58:56 +00:00
Tim Potter
9b305b1543 Forgot pipes_struct conversion for api_samr_enum_dom_aliases()
(This used to be commit 66372765e7)
2000-06-16 08:47:52 +00:00
Tim Potter
e83ddf6e69 Simplified server pipe implementation by changing arguments passed down
through to the individual pipe api calls.  Instead of passing two
prs_struct pointers, we now pass the pipes_struct pointer which contains
the former information as well as other useful stuff like the vuid.

Pass the vuid from the pipes_struct down to the lower level spoolss
functions to perform security checks.

ZERO_STRUCTP the info_2 structure before filling it.  Free the device mode
field before freeing the info_2 to avoid a memory leak.  Fixed
uninitialised pointer bug in fill_job_info_2().
(This used to be commit a9547b7e3a)
2000-06-16 08:18:09 +00:00
Tim Potter
bc21403497 Simplified server pipe implementation by changing arguments passed down
through to the individual pipe api calls.  Instead of passing two
prs_struct pointers, we now pass the pipes_struct pointer which contains
the former information as well as other useful stuff like the vuid.

Pass the vuid from the pipes_struct down to the lower level spoolss
functions to perform security checks.
(This used to be commit f6436aacd6)
2000-06-16 08:15:01 +00:00
Tim Potter
ea2945881d Simplified server pipe implementation by changing arguments passed down
through to the individual pipe api calls.  Instead of passing two
prs_struct pointers, we now pass the pipes_struct pointer which contains
the former information as well as other useful stuff like the vuid.

Removed dependency on extern current_user and fetch the vuid from the
pipes_struct.
(This used to be commit 1b06451fff)
2000-06-16 08:12:23 +00:00
Tim Potter
a72f277f72 Simplified server pipe implementation by changing arguments passed down
through to the individual pipe api calls.  Instead of passing two
prs_struct pointers, we now pass the pipes_struct pointer which contains
the former information as well as other useful stuff like the vuid.
(This used to be commit 96addba216)
2000-06-16 08:11:32 +00:00
Tim Potter
2c3cd9ecba Removed some debugs.
(This used to be commit 6faa963b23)
2000-06-15 02:26:54 +00:00
Tim Potter
7b89d2b93f Changed server side lsa_lookup_sids function to look up SIDs that we are
not authoritative for using winbindd.
(This used to be commit a39cdffb14)
2000-06-14 10:02:48 +00:00
Jean-François Micouleau
e58682eb07 do some standard_sub_advanced() in api_net_sam_logon on lp_logon_xxx().
and if you have unix realname=yes, you get the gecos name when locking the
station.

	J.F.
(This used to be commit b5ad24ae0b)
2000-06-09 14:13:11 +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 8ef41f31c5)
2000-06-07 01:49:23 +00:00
Jeremy Allison
d253db1b9a Memory leak fixes.
Jeremy.
(This used to be commit 34b63896ab)
2000-06-06 20:44:58 +00:00
Jeremy Allison
84aa9ad049 Create elements in default, not in read.
Jeremy.
(This used to be commit 0d681ea252)
2000-06-06 01:34:20 +00:00
Jeremy Allison
6d8c131f50 Some tidyup fixes (memory leaks etc.). Still no progress with the
"no driver" issue. I'm banging my head against comparitive packet
dumps right now...
Jeremy.
(This used to be commit 03cd4aa144)
2000-06-05 20:55:57 +00:00
Andrew Tridgell
dbf004bdab added a MANGLE_DRIVER_PATH define to chooose whether we stuff with the
driver path do a rename etc.

I turned it off by default as it is causing me no end of problems. The
client will *cache* this path, and that screws things up badly as the
temp directory is no longer there when it is needed.
(This used to be commit 46f5f41c88)
2000-06-04 00:26:08 +00:00
Jeremy Allison
5a5540f87a rpc_client/cli_lsarpc.c: Removed unused variable.
rpc_server/srv_spoolss_nt.c: Fixed more memory leaks.
smbd/nttrans.c: Fixed shadow variable problem.
Jeremy.
(This used to be commit f0a7540831)
2000-06-03 00:53:07 +00:00
Jeremy Allison
0cc1389935 More memory leak and PANIC action fixes.
This is *horrible* code :-(.
Jeremy.
(This used to be commit ac383bb765)
2000-06-02 21:16:39 +00:00
Jeremy Allison
c7d0975183 More memory leak fixes.
Jeremy.
(This used to be commit 4e7b6b20ea)
2000-06-02 20:08:28 +00:00
Jeremy Allison
2472ab1e60 More memory corruption (leaks etc.) fixes.
Jeremy.
(This used to be commit 71a0621f55)
2000-06-02 19:42:11 +00:00
Jeremy Allison
01c4ecd234 Fixed null pointer indirect in addprinterex. Still working on problem
with extra directory layer in NT drivers.
Jeremy.
(This used to be commit 48a8031826)
2000-06-02 18:38:49 +00:00
Jeremy Allison
8ff6458a3e More insure found memory leak and corruption fixes.
Jeremy.
(This used to be commit 3cdcfa6325)
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 d175d3ebef)
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 eba31e4e80)
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 c2099cfb03)
2000-06-01 17:01:34 +00:00
Jeremy Allison
cc22d7ea29 Changes I really don't want to lose whilst CVS is playing up.
Dynamic changes to spoolss code.
Jeremy.
(This used to be commit 0a5e7a8f31)
2000-06-01 02:35:30 +00:00
Matthew Chapman
badb7fc0d2 Fixed LsaQueryInformationPolicy level 3 to return primary domain info.
Domain SID is saved in secrets.tdb upon joining domain.

Added "Authenticated Users" and "SYSTEM" well-known SIDs (under
NT Authority).
(This used to be commit 7710b4f48d)
2000-05-29 01:23:48 +00:00
Andrew Tridgell
5b5f41d8e0 fixed some more crashes
this introduces some memory leaks that I need to fix later
(This used to be commit 2170d72d50)
2000-05-29 01:09:14 +00:00
Luke Leighton
140523dc46 lp_server_role() + use in srv_reg.
(This used to be commit 82e47e268c)
2000-05-28 23:34:34 +00:00
Andrew Tridgell
38b32fb97f don't free a driver structure from the stack!
(This used to be commit d241f1dcaf)
2000-05-28 23:00:23 +00:00
Andrew Tridgell
0c396eef79 fixed return error code that had 0xC with not enough zeros
(This used to be commit d859de2870)
2000-05-28 22:59:13 +00:00
Luke Leighton
4a0635cd6d #ifdef not #if
(This used to be commit f0229102fe)
2000-05-28 21:21:07 +00:00
Luke Leighton
b38aa95bc9 moved notif_y_table struct to spoolss_nt.c only used there.
#ifdef'd driver-code out with define RELIES_ON_SMBD_SPECIFIC_CODE because
spoolssd doesn't link with smbd/*.c (find_service("print$") is not
possible).
(This used to be commit 726c359d1d)
2000-05-28 21:01:14 +00:00