1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-05 20:58:40 +03:00

50 Commits

Author SHA1 Message Date
Andrew Tridgell
c41fc06376 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn. -
Andrew Tridgell
debb471267 The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
-
Tim Potter
69d90a8af1 Removed bogus server_n local variable in connect_one() function. -
Tim Potter
9874df0c22 Added some missing entries to usage().
Added -d option to set debug level.
-
Andrew Tridgell
674ee2f1d1 next_token() was supposed to be a reentrant replacement for strtok(),
but the code suffered from bitrot and is not now reentrant. That means
we can get bizarre behaviour
i've fixed this by making next_token() reentrant and creating a
next_token_nr() that is a small non-reentrant wrapper for those lumps
of code (mostly smbclient) that have come to rely on the non-reentrant
behaviour
-
Jeremy Allison
87f647715d Warning fix from Andrew Bartlett.
Jeremy.
-
Jeremy Allison
66f959e0ff rpc_server/srv_srvsvc_nt.c: Don't test an uint32 for < 0.
utils/smbcacls.c: Set enum correctly.
Jeremy.
-
Jeremy Allison
0ae0d024f5 Fixup smbcacls. Don't return memory already freed, don't free memory allocated
with talloc.
Jeremy.
-
Andrew Tridgell
5d899e51a4 fixed some uninitialised variables -
Gerald Carter
0a6ceed279 rpcclient merge from 2.2 (including Jeremy's non-void return fix) -
Jeremy Allison
fc76681812 Merge of Andrew's changes in 2.2.
Jeremy.
-
Jeremy Allison
493d2c316a Added SMB_ prefix to enums that clash with Solaris ACL definitions.
Jeremy.
-
Jeremy Allison
70beabf73b Ooops - forgot to check the rpcclient and smbcacls compile with the new
code :-(.
Jeremy.
-
Andrew Tridgell
b0b49a4b28 make sure denied aces are first -
Andrew Tridgell
703d9f5cb3 cast the qsort -
Andrew Tridgell
61293979ce - fixed the sort_acl bug, sorting now works right
- don't allow setting of duplicate ACEs
- fixed a ACE delete bug
-
Andrew Tridgell
5934137741 don't crash on null acl sort -
Andrew Tridgell
48ab6297a1 - workaround filer lsa lookup bug for unknown sids
- add \ at start of name if not needed (another filer workaround)
-
Andrew Tridgell
c0f57c3fe6 cope with filer/NT/samba all in one binary. yeah.
we now don't open rw for acls
-
Andrew Tridgell
f191271986 don't need _uni hack now -
Tim Potter
394e17645b Some systems don't support SEC_RIGHTS_MAXIMUM_ALLOWED for lsa_open_policy()
but NT sends 0x2000000 so we might as well do it too.
-
Tim Potter
b4773618ac Return appropriate exit codes for various situations:
0 for success
    1 if operation failed
    2 command line parse error
-
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
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
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
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.
-
Tim Potter
5e547ddcb5 Renamed parameters and variables called acl to the_acl as it conflicts
with a Solaris system call.
-
Tim Potter
09d2d972fd Cache lsa connection and policy handle for resolving names and sids. -
Tim Potter
5001bbc64b Convert names to sids when modifying ACLs. Convert sids to names when
displaying ACLs.
-
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
ed5bda119a Added undocumented -t command for testing parsing of acl entries.
Print out hex value for ace mask if we can't decode it.

We can now parse FULL,CHANGE,READ as well as combos of RWXDPO as ace mask
values.

Clarified usage message.

Bomb out if excess args are given.
-
Andrew Tridgell
032442802f added a comment -
Andrew Tridgell
374d08be64 fixed the parsing again and got setting acls working with w2k -
Tim Potter
faaa71a032 Added some cli_errstr() calls. -
Tim Potter
ee6f5a9672 Removed lsa lookup warnings (I'll remember).
Print an error if -M refers to a non-existent ACL.
-
Andrew Tridgell
117956ecb1 fixed setting ACLs on directories -
Tim Potter
8a20318c56 Mask value now displayed as READ/CHANGE/FULL for standard permissions, or
RWXDPO for special permissions.

Append 0x to values printed as hex.

Spruced up the help message.
-
Andrew Tridgell
52b27d75e1 removed SACL support (as it doesn't work with w2k if you ask for
SACLs)
-
Andrew Tridgell
71adecd163 signed/unsigned warning fixed -
Andrew Tridgell
44524958ed fixed acls set bug -
Andrew Tridgell
077ee4a7ac fixed SACL bug -
Andrew Tridgell
1e0d5f0695 - with -D only delete first match
- fixed delete bug
-
Andrew Tridgell
cb324b53c6 - added help
- added add/modify/delete/set as separate operations
-
Andrew Tridgell
f8dbd2b799 cleaner parsing and default handling -
Andrew Tridgell
fd4c03aef6 - better parsing
- started to add non-numeric support
-
Andrew Tridgell
6cea1647fc getting/setting acls now works. The SIDs are still numeric, the next
step is to support usernames etc
-
Andrew Tridgell
c6c90dc8e1 added basic ability to dump remote file acls -
Andrew Tridgell
f2f9859b70 a prootype program for querying/setting a security decsriptor on a
remote machine

it is by no means complete, expect more commits soon
-