1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

4175 Commits

Author SHA1 Message Date
Jeremy Allison
e3048cfc0b Fixed memory leak with NT tokens.
Added debug messages to se_access_check().
Added FULL_ACCESS acl to default acl on printers.
Jeremy.
(This used to be commit 7507f6f408)
2000-08-09 18:40:48 +00:00
Andrew Tridgell
fadb15da71 got error code right for printer update/add failure
(This used to be commit 0d00d2ec25)
2000-08-09 07:34:35 +00:00
Andrew Tridgell
64f6dd86a8 add printer admin docs
(This used to be commit 1342f2e5be)
2000-08-09 04:25:01 +00:00
Andrew Tridgell
db24453581 added printer admin option
any user in that list can do anything to a printer
(This used to be commit 7b5912be15)
2000-08-09 04:19:18 +00:00
Gerald Carter
0756908d55 Fixed AddPrinterDriver()
jerry
(This used to be commit 39d025693e)
2000-08-09 02:04:25 +00:00
Andrew Tridgell
0d7df3ee01 fixed help string
(This used to be commit 16afa46797)
2000-08-09 00:11:01 +00:00
Jeremy Allison
04de6d0258 Found the sec_ctx_stack overflow - a become_root() should have been an
unbecome_root() - typo.
Jeremy.
(This used to be commit ebb160663e)
2000-08-08 23:49:26 +00:00
Jeremy Allison
b4d1e192cd Added SID "Everyone" S-1-1-0 as always matching if present in an ACE.
Jeremy.
(This used to be commit b3a1038ac1)
2000-08-08 21:51:22 +00:00
Jeremy Allison
0cabe327ef Changed the sec desc access checks to match the spec. Needs testing.
Jeremy.
(This used to be commit 5a4a7cd472)
2000-08-08 19:34:34 +00:00
Gerald Carter
d5e17b34ec make proto
(This used to be commit 74074072cf)
2000-08-08 07:23:20 +00:00
Gerald Carter
3a123d2572 cleanup in init_unistr2_from_unistr()
--jerry
(This used to be commit 1e00ac19cd)
2000-08-08 06:59:35 +00:00
Gerald Carter
f296a8d087 All changes related to rpcclient...
- cleaned up some code
- Fixed a few memory leaks of my own making
- Add AddPrinterDriver(); I'm missing some of the semantics
  here as the call is done correctly, but I'm not getting all
  the information right in the DRIVER_INFO_3 struct I think.
  Will work on it tomorrow some more...



--jerry
(This used to be commit 3bf9a29f34)
2000-08-08 06:57:48 +00:00
Gerald Carter
8705fbc42c it is not my day it seems. :-(
Fixed missing )


j-
(This used to be commit 7b69cbbde3)
2000-08-05 19:18:25 +00:00
Gerald Carter
cfb5d7d84c removed the for() loop to copy the buffer in init_unistr2_from_unistr()
Replaced with a memcpy()



Forgot to commit this a few moments ago


j-
(This used to be commit 34d4fb54c3)
2000-08-05 19:03:00 +00:00
Gerald Carter
139dcbb0bf Fixed bug in init_unistr2_from_unistr() found by Elrond.
Thanks :-)





j-
(This used to be commit 4ecd15cd58)
2000-08-05 18:58:45 +00:00
John Terpstra
754f021fc7 Adding build file.
(This used to be commit b87c47cc86)
2000-08-04 21:03:10 +00:00
John Terpstra
48b47496cc Adding build system files for Caldera OpenLinux.
(This used to be commit 8de3786f5a)
2000-08-04 20:53:28 +00:00
Gerald Carter
dd3479dfe4 make proto
(This used to be commit dfd6b51bc7)
2000-08-04 20:47:06 +00:00
Gerald Carter
4fabc1ad0d spoolss_addprinterex() was adding the printer and returning the
correct handle, but was deleting the connection to the server.
Doh!!



--jerry
(This used to be commit 8e5e929561)
2000-08-04 20:32:34 +00:00
Jeremy Allison
b3b512264d Fixed up se_access_check() to use the token list from the user struct
as the SID list. Now to go through and tidy up the algorithm.
Jeremy.
(This used to be commit 1f7300df67)
2000-08-04 19:56:58 +00:00
Volker Lendecke
e2031ab34c Added my course notes. Had asked Jeremy some weeks ago.
It's german language, feel free to remove it again.

Volker
(This used to be commit a40f22427a)
2000-08-04 16:08:04 +00:00
Gerald Carter
05e169b558 make proto
(This used to be commit 6bdb7d5c97)
2000-08-04 13:30:52 +00:00
Gerald Carter
4003a1c55b clunky support for calling AddPrinterEx(). The code currently reports
that the call failed, but the printer shows up on the remote NT client.
(note this is the client side call).  I've botched the return value
somewhere and will fix that today.




jerry
(This used to be commit e15d9befd2)
2000-08-04 12:46:36 +00:00
Gerald Carter
394795e28b After talking with Jeremy and JF (and staring at packet traces between
NT <-> NT), I've come to realize that UNISTR2 strings should be NULL
terminated.




jerry
(This used to be commit c8f9e54bea)
2000-08-04 12:42:19 +00:00
Tim Potter
553579bf6f In cli_error() return ENOENT when an ERROR_INVALID_NAME is received instead
of the generic EINVAL.
(This used to be commit a290107aee)
2000-08-04 06:13:05 +00:00
Jeremy Allison
06e4f11acd Fixed up the user/group contexts when using authenticated pipes.
Added a become_root()/unbecome_root() (push/pop security context)
around the initgroups() call to ensure it would succeed. Hmmm - I
wonder if this call being done as non-root might explain any "group access"
bugs we've had in the past....
Jeremy.
(This used to be commit 06a65972e8)
2000-08-04 00:59:09 +00:00
Jeremy Allison
f87399915b Added an NT_USER_TOKEN structure that is copied/passed around associated
with the current user. This will allow se_access_check() to quickly do
a SD check without having to translate uid/gid's to SIDs.
Still needs work on pipe calls.
Jeremy.
(This used to be commit e28d01b744)
2000-08-03 22:38:43 +00:00
Jeremy Allison
468af1937d Much though I hate to admit it - JF was completely correct. I cannot
now reproduce the bug I had with adding a printer driver, and PrintMig.exe
crashes if I use my SD code but works with his.
I stand completely corrected :-). - So I'm reverting to his code as it works :-).
Jeremy.
(This used to be commit d6db29be98)
2000-08-02 18:49:36 +00:00
Jeremy Allison
17dcd9a834 Started to canonicalize our handling of uid -> sid code in order to
get ready and fix se_access_check().
Added cannonical lookup_name(), lookup_sid(), uid_to_sid(), gid_to_sid()
functions that look via winbind first the fall back on local lookup.

All Samba should use these rather than trying to call winbindd code
directly.

Added NT_USER_TOKEN struct in user_struct, contains list of NT sids
associated with this user.

se_access_check() should use this (cached) value rather than attempting
to do the same thing itself when given a uid/gid pair.

More work needs to be done to preserve these things accross security
context changes (especially with the tricky pipe problem) but I'm
beginning to see how this will be done..... probably by registering
a new vuid for an authenticated RPC pipe and not treating the
pipe calls specially.

More thoughts needed - but we're almost there...

Jeremy.
(This used to be commit 5e5cc6efe2)
2000-08-02 02:11:55 +00:00
Jeremy Allison
7f36df301e Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need NT_STATUS_XXX).
Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more
obscure way.
Jeremy.
(This used to be commit c55bcec817)
2000-08-01 18:32:34 +00:00
Jeremy Allison
d95777ac34 Added print job substitutions for %{printername}, %{sharename} and %{portname}
from the NT printer tdb.
Also added checks for time restrictions before allowing a job to print.
Jeremy.
(This used to be commit 8cfb55e81a)
2000-08-01 00:41:19 +00:00
Jeremy Allison
55ff9cb38b Save & restore the port name correctly.
Jeremy.
(This used to be commit c0648c981e)
2000-07-31 21:41:03 +00:00
Jeremy Allison
49fcb300de Added John Reilly's enumports/addprinter/delprinter scripting code plus the
fix for the Win9x printer drivers.
Changed command names to add "command" string on the end for some consistancy
with the other scripting commands.
Added '%P' option to tdbpack/unpack to store long comment string.
Made port name be "Samba Printer Port" if no enum port script given.
Fixed prs_uint32_pre code to cope with null args.
Jeremy.
(This used to be commit 902ada6379)
2000-07-31 20:41:51 +00:00
Gerald Carter
2759822674 make proto
(This used to be commit 38b0739556)
2000-07-31 15:17:29 +00:00
Gerald Carter
f9d3ff99fd More work on rpcclient...
* Fixed to work with Jeremy's recent changes re: dunamic
    memory allocation when unmarshalling unistr[2]
  * included EnumPorts level 1
  * more work on AddPrinterEx




--jerry
(This used to be commit d321d0dddd)
2000-07-31 14:56:01 +00:00
Gerald Carter
a6ef985df4 More work on rpcclient...
* Fixed to work with Jeremy's recent changes re: dunamic
    memory allocation when unmarshalling unistr[2]
  * included EnumPorts level 1
  * more work on AddPrinterEx




--jerry
(This used to be commit 45fbf31b69)
2000-07-31 14:50:53 +00:00
John Terpstra
cf152386f6 Adding pages oopsed.
(This used to be commit 7df53b8211)
2000-07-30 07:40:18 +00:00
John Terpstra
693fba1eb2 Adding Using_Samba book back to Samba-pre3.
(This used to be commit 9f5f8ad21d)
2000-07-30 07:38:43 +00:00
John Terpstra
c46e6a5961 Adding missing man pages.
(This used to be commit 25091dcf7c)
2000-07-30 06:52:16 +00:00
John Terpstra
2e1603868d Adding missing smbsh.1 man page source.
(This used to be commit 856a3773dc)
2000-07-30 06:50:39 +00:00
John Terpstra
8a2a1ff628 Updating for Samba-3.
(This used to be commit 183d55b2ae)
2000-07-30 06:37:46 +00:00
John Terpstra
5dbd30002a Adding files provided by Klaus Singvogel of Caldera
(This used to be commit ab6d01bdcc)
2000-07-30 06:33:30 +00:00
Tim Potter
b58ebd10de Fixed read overrun in init_string2()
(This used to be commit 4ab75143c4)
2000-07-28 06:27:32 +00:00
Jean-François Micouleau
3cc9e1a6a7 remove warnings
J.F.
(This used to be commit 9178d2a1aa)
2000-07-27 08:00:25 +00:00
Jean-François Micouleau
642ae91256 fix the devmode.orientation being set to 0.
that bug was *subtle* :-(

	J.F.
(This used to be commit 0e9e048b6d)
2000-07-27 07:59:39 +00:00
Jeremy Allison
5ec1642809 Ok - this is a *BIG* change - but it fixes the problems with static strings
in the RPC code. This change was prompted by trying to save a long (>256)
character comment in the printer properties page.

The new system associates a TALLOC_CTX with the pipe struct, and frees
the pool on return of a complete PDU.

A global TALLOC_CTX is used for the odd buffer allocated in the BUFFERxx
code, and is freed in the main loop.

This code works with insure, and seems to be free of memory leaks and
crashes (so far) but there are probably the occasional problem with
code that uses UNISTRxx structs on the stack and expects them to contain
storage without doing a init_unistrXX().

This means that rpcclient will probably be horribly broken.
A TALLOC_CTX also needed associating with the struct cli_state also,
to make the prs_xx code there work.

The main interface change is the addition of a TALLOC_CTX to the
prs_init calls - used for dynamic allocation in the prs_XXX calls.

Now this is in place it should make dynamic allocation of all RPC
memory on unmarshall *much* easier to fix.

Jeremy.
(This used to be commit 0ff2ce543e)
2000-07-27 00:47:19 +00:00
Jean-François Micouleau
134a4b8654 if no comment in TDB, use comment from print share.
J.F.
(This used to be commit c267b23620)
2000-07-26 10:31:05 +00:00
Jean-François Micouleau
1e3a5503cd Found out that we are crashing spoolss in enumprinterdata.
So fixed enumprinterdatas in rpcclient to debug the server code,
and found that the parsing code was missing 2 prs_align().

We are not crashing NT anymore. :-)

        J.F.
(This used to be commit 883f7402d4)
2000-07-26 09:40:49 +00:00
Tim Potter
18db0514fd Fixed memory leaks in root and non-root password changing.
(This used to be commit f3a4f81a5e)
2000-07-26 03:55:17 +00:00
Tim Potter
c89cf814cc Fixed memory leaks in _spoolss_addprinterdriver()
(This used to be commit 1f49788442)
2000-07-26 03:38:30 +00:00