1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

4674 Commits

Author SHA1 Message Date
Tim Potter
01a89978ff Don't call string_to_sid after cli_lsa_lookup_names() fails.
Can't use space as a ACL separator as it breaks NT user/group names that
contain spaces (i.e most of the default ones).

The MSDN is contradictory over the exact ordering of ACE entries in an ACL.
However NT4 gives a "The information may have been modified by a computer
running Windows NT 5.0" if denied ACEs do not appear before allowed ACEs.
Sort ACE list before calling cli_set_secdesc().
-
Tim Potter
935b77573e Some systems seem to only accept a ntcreate&x with a unicode filename
despite samba negotiating ascii filenames.  Retry with unicode pathnames
if the ascii version fails.

Convert all forward slashes to backslashes in the filename argument.
-
Tim Potter
c4476c6315 Added a cli_nt_create_uni() to do a ntcreate&x with a unicode filename,
regardless of the settings negotiated in the flags2 smb field.
-
Tim Potter
1a228868cf Replace magic number with constant. -
Tim Potter
e21f2ef4fb Cleaned up SidToString() and StringToSid() exit paths.
Can now use user%password format in $USER environment variable.  -U option
is now optional.
-
Jeremy Allison
56a93567a1 Removed uninitialised variable.
Jeremy.
-
Andrew Tridgell
f2be88a873 implemented a much nicer name_status() interface. It now returns a
list of structures rather than the dodgy parsing code we had before

this also gets smbw working correctly with no initial workgroup (using
name_status_find on __MSBROWSE__ returns)
-
Jeremy Allison
c25533de99 Fixed bug found by Gerald. If a Samba server joins a domain and is set
to search for a DC to authenticate to using the "*" syntax than ensure
that for the first hour after the password change is searches for the
PDC using the 1B name not the 1C name as domain replication may not
have occured.
Jeremy.
-
Jeremy Allison
0f39895ab0 Split set_nt_acls into owner set (which uses chown) and permission set
(which currently uses chmod) in preparation for ACL creation.
Jeremy.
-
Jeremy Allison
1a31b4eb08 Split the one sys_acl_free call into sys_acl_free_TYPE calls, to allow
easier wrapping of non-POSIX ACL interfaces.
Jeremy.
-
Jeremy Allison
a83702c99f A couple more UMR fixes.
Jeremy.
-
Jeremy Allison
e0931cda80 Cast prs_alloc_mem to correct type.
Jeremy.
-
Jeremy Allison
c48e95297e Fix typos in new group sid check.
Jeremy.
-
Tim Potter
dcea2a4bc0 Added query info policy call. -
Jeremy Allison
26f873540c Merged Tim's fixes from appliance-head.
Jeremy.
-
Tim Potter
8ccd06ee96 Streamlined exit path.
Allow NULL to be passed to cli_lsa_initialise() which creates an anonymous
connection to the server.
-
Jeremy Allison
43ca0d991c Fixed chown/chgrp setting from smbcacls.
Jeremy.
-
Jeremy Allison
12f88c9ba7 Added -C username and -G username that allow a user (usually Administrator)
to change the ownership or group ownership of a file to any arbitrary user
from the UNIX command line.
This will show the people who quote NT manuals at us about how this is
"impossible" how their operating system really works :-).
Jeremy.
-
Jeremy Allison
89708be73a Documented -C and -G options to smbcacls.
Jeremy.
-
Jeremy Allison
ce4f461965 Never free anything in the rpc_parse/prs_XXX functions. Do it in the enclosing
function.
lib/util_unistr.c: Check lengths *before* reading source - prevent uninitialised
memory reads.
Jeremy.
-
Jeremy Allison
506b5e34c3 Added lock backouts on fail.
When chaining together long lines of bloody "if" statements, which should
logically be separated, and one of them allocates memory, remember to
*free* it *WHETHER OR NOT THE IF STATEMENTS SUCCEEDED* !!!!
Yes I do consider this a bug in the coding style of Tridge, Rusty, Tim et al. :-).
I'm just pissed 'cos this took 4 hours to track down even with an insure error report
stating me in the face and also Ben Woodward looking over the code with me :-).
Jeremy.
-
Jean-François Micouleau
69fe739303 lib/util_unistr.c:
rewrote unistr2_to_ascii() to correct a bug seen on SGI boxes.

rpc_parse/parse_misc.c:
rpc_parse/parse_prs.c:
        rewrote of BUFFER5 handling to NOT byteswap when it was already in
        network byte order.

rpc_parse/parse_samr.c:
        cleanup of samr_io_q_lookup_domain(), remove the over-parsing by 2
        bytes.

rpc_server/srv_lsa.c:
        UNISTR2 strings need to be NULL terminated to pleased W2K.

rpc_server/srv_spoolss_nt.c:
        use snprintf instead of safe_strcpy as we want the string
        truncated at 32 chars.


That should fix SUN and SGI box not able to act as printserver and the
problem with joining from a W2K wks.

        J.F.
-
Jeremy Allison
d0d31eead3 Fixed memory leak in JOB_INFO_2 code.
Jeremy.
-
Jeremy Allison
0a40bc83e1 Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. Merged
in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open
problem.
Jeremy.
-
David O'Neill
505a8a2277 Changes from APPLIANCE_HEAD:
- add some debugs for comparing two security descriptors.
      (source/rpc_parse/parse_sec.c)
-
Jeremy Allison
15ae2c335b Updates from appliance-head.
Jeremy.
-
Tim Potter
5e547ddcb5 Renamed parameters and variables called acl to the_acl as it conflicts
with a Solaris system call.
-
Tim Potter
bd87398b5a Updated smbcacls documentation. -
Tim Potter
09d2d972fd Cache lsa connection and policy handle for resolving names and sids. -
Gerald Carter
0e5c1df284 inverted dword value
jerry
-
David O'Neill
c533e77f19 Changes from APPLIANCE_HEAD:
- trivial typo in definition of enum_printing[]
	  (source/param/loadparm.c)
	- fixed printer status display bug.  When no jobs existed in queue, the
	  clients were not properly notified of printer status.  This caused
	  native tools for pausing/unpausing a print queue to not work.
	  (source/printing/printing.c)
-
Jeremy Allison
f4c7f9ddb9 Added proto definition for new RPC calls.
Added printing fix from appliance-head.
Jeremy.
-
Tim Potter
fde66badf1 I think it's time to go home. -
Tim Potter
a724850eb8 OK so I shouldn't have added cli_pipe.o to LIBSMB_OBJ. -
Tim Potter
c130d5b0f6 Add libsmb/cli_lsarpc.o and rpc_client/cli_pipe.o to LIBSMB_OBJ. Not so
sure about the latter...

Modified SMBCACLS_OBJ
-
Tim Potter
5001bbc64b Convert names to sids when modifying ACLs. Convert sids to names when
displaying ACLs.
-
Tim Potter
129d5a155a Lightweight rpc client library. Uses only routines in libsmb and
rpc_client/cli_pipe.c

Only cli_lsa_open_policy(), cli_lsa_close(), cli_lsa_lookup_names()
and cli_lsa_lookup_sids() implemented so far.
-
Tim Potter
5c5c3a8a08 Server side changes for dynamic names in lsa_lookup_names -
Tim Potter
34743c1576 make proto
Updates for dynamic sized lookup names/sids
-
Tim Potter
1db0f31ae0 Wrong length for unistr2 in init_q_lookup_names()
Removed some more static arrays and replaced with tallocated memory
blocks.
-
Jeremy Allison
dd959fa325 Two tdb bugfixes. First one - ensure that traverse lock is moved before deleting
dead records, else the record is just marked for deletion, not actually deleted.
Second, ensure allocated record is marked as "in use" before free list lock is
released, else other processes in the freelist merge code may try and merge it.
Jeremy.
-
Tim Potter
4d80ee4f41 Added support for SERVICESF shared variable to change configuration file
used in lp_load().
-
Jeremy Allison
f0d7867801 Fixed bug noticed by JF. se_access_check needs user SID as first in token.
Jeremy.
-
Jeremy Allison
1e719a8076 Fixed processing of dfree script (was truncating).
Jeremy.
-
David O'Neill
03dd90ab92 Brief documentation on using the virtual printer code -
Gerald Carter
3b7d0fe7eb more fixes from Simo. Also fixed the password expiration field
in the tdbsam to never expire (we don't support this yet).




jerry
-
Tim Potter
6fd5dc8145 Don't print out the security descriptor type as it is automatically
calculated by the new make_sec_desc() function.
-
Tim Potter
d119782d0d Better error checking for ACL parsing.
Print an error when attempting to delete a non-existent ACL.
-
Tim Potter
73b237e639 Fix error string. -
Tim Potter
fa604bc85e Fixed some accidentally reversed patches. -