Andrew Tridgell
b12a4dd9b6
declare dbf in one spot
...
(This used to be commit f41c3bb80f
)
2001-09-10 12:14:18 +00:00
Andrew Tridgell
b30e75692d
replaced stdio in many parts of samba with a XFILE. XFILE is a cut-down
...
replacemnt of stdio that doesn't suffer from the 8-bit filedescriptor
limit that we hit with nasty consequences on some systems
I would eventually prefer us to have a configure test to see if we need
to replace stdio, but for now this code needs to be tested widely so
I'm enabling it by default.
(This used to be commit 1af8bf34f1
)
2001-09-10 11:08:57 +00:00
Andrew Tridgell
c76dd14040
it now all compiles - so try enabling it by default and see what explodes on the build farm
...
(This used to be commit 5bb7e4f0f6
)
2001-09-04 10:57:29 +00:00
Andrew Tridgell
b031af348c
converted another bunch of stuff to NTSTATUS
...
(This used to be commit 1d36250e33
)
2001-08-27 19:46:22 +00:00
Andrew Tridgell
464237cdb8
fixed handling of 139/445 in clients
...
(This used to be commit 22b372f8a7
)
2001-08-24 20:11:09 +00:00
Andrew Tridgell
527e824293
strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
...
(This used to be commit c41fc06376
)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
87fbb7092b
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.
(This used to be commit debb471267
)
2001-07-04 07:15:53 +00:00
Tim Potter
d972dc06a1
Removed bogus server_n local variable in connect_one() function.
...
(This used to be commit 69d90a8af1
)
2001-07-04 04:04:17 +00:00
Tim Potter
39a265ae20
Added some missing entries to usage().
...
Added -d option to set debug level.
(This used to be commit 9874df0c22
)
2001-06-27 04:43:55 +00:00
Andrew Tridgell
91b8a8d1d2
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
(This used to be commit 674ee2f1d1
)
2001-06-21 09:10:42 +00:00
Jeremy Allison
6fb063b4d5
Warning fix from Andrew Bartlett.
...
Jeremy.
(This used to be commit 87f647715d
)
2001-06-20 17:49:38 +00:00
Jeremy Allison
c1fbf761ce
rpc_server/srv_srvsvc_nt.c: Don't test an uint32 for < 0.
...
utils/smbcacls.c: Set enum correctly.
Jeremy.
(This used to be commit 66f959e0ff
)
2001-06-19 00:44:23 +00:00
Jeremy Allison
f5eab4421c
Fixup smbcacls. Don't return memory already freed, don't free memory allocated
...
with talloc.
Jeremy.
(This used to be commit 0ae0d024f5
)
2001-05-01 23:07:30 +00:00
Andrew Tridgell
7e82811d2d
fixed some uninitialised variables
...
(This used to be commit 5d899e51a4
)
2001-05-01 04:05:53 +00:00
Gerald Carter
e40449fa72
rpcclient merge from 2.2 (including Jeremy's non-void return fix)
...
(This used to be commit 0a6ceed279
)
2001-04-28 00:32:56 +00:00
Jeremy Allison
2ef68c7e92
Merge of Andrew's changes in 2.2.
...
Jeremy.
(This used to be commit fc76681812
)
2001-04-13 19:12:06 +00:00
Jeremy Allison
3a38f122d9
Added SMB_ prefix to enums that clash with Solaris ACL definitions.
...
Jeremy.
(This used to be commit 493d2c316a
)
2001-04-11 01:34:37 +00:00
Jeremy Allison
6ed9b52862
Ooops - forgot to check the rpcclient and smbcacls compile with the new
...
code :-(.
Jeremy.
(This used to be commit 70beabf73b
)
2001-02-28 01:38:12 +00:00
Andrew Tridgell
7082b61c4b
make sure denied aces are first
...
(This used to be commit b0b49a4b28
)
2001-02-23 07:25:49 +00:00
Andrew Tridgell
46807bd187
cast the qsort
...
(This used to be commit 703d9f5cb3
)
2001-02-23 07:21:50 +00:00
Andrew Tridgell
8d070c60fc
- fixed the sort_acl bug, sorting now works right
...
- don't allow setting of duplicate ACEs
- fixed a ACE delete bug
(This used to be commit 61293979ce
)
2001-02-23 07:20:11 +00:00
Andrew Tridgell
b4096748dd
don't crash on null acl sort
...
(This used to be commit 5934137741
)
2001-02-22 06:35:54 +00:00
Andrew Tridgell
4e1de143b3
- workaround filer lsa lookup bug for unknown sids
...
- add \ at start of name if not needed (another filer workaround)
(This used to be commit 48ab6297a1
)
2001-02-22 06:22:20 +00:00
Andrew Tridgell
9ccbc1de06
cope with filer/NT/samba all in one binary. yeah.
...
we now don't open rw for acls
(This used to be commit c0f57c3fe6
)
2001-02-22 03:40:01 +00:00
Andrew Tridgell
6cb19fbd3a
don't need _uni hack now
...
(This used to be commit f191271986
)
2001-02-20 23:53:06 +00:00
Tim Potter
a699e9b572
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.
(This used to be commit 394e17645b
)
2001-01-23 17:33:35 +00:00
Tim Potter
1459f1022c
Return appropriate exit codes for various situations:
...
0 for success
1 if operation failed
2 command line parse error
(This used to be commit b4773618ac
)
2000-12-21 23:36:25 +00:00
Tim Potter
ca727bd638
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().
(This used to be commit 01a89978ff
)
2000-12-21 06:21:26 +00:00
Tim Potter
855bcea38e
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.
(This used to be commit 935b77573e
)
2000-12-21 05:28:39 +00:00
Tim Potter
d15bef816d
Cleaned up SidToString() and StringToSid() exit paths.
...
Can now use user%password format in $USER environment variable. -U option
is now optional.
(This used to be commit e21f2ef4fb
)
2000-12-21 00:12:59 +00:00
Jeremy Allison
8325948287
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.
(This used to be commit 12f88c9ba7
)
2000-12-16 00:08:05 +00:00
Jeremy Allison
369f5fd1d7
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.
(This used to be commit 0a40bc83e1
)
2000-12-15 01:02:11 +00:00
Tim Potter
624431c98b
Renamed parameters and variables called acl to the_acl as it conflicts
...
with a Solaris system call.
(This used to be commit 5e547ddcb5
)
2000-12-14 05:38:05 +00:00
Tim Potter
237e74730c
Cache lsa connection and policy handle for resolving names and sids.
...
(This used to be commit 09d2d972fd
)
2000-12-14 03:27:53 +00:00
Tim Potter
56ee3e2e2f
Convert names to sids when modifying ACLs. Convert sids to names when
...
displaying ACLs.
(This used to be commit 5001bbc64b
)
2000-12-13 12:53:42 +00:00
Tim Potter
76dca9c1fb
Don't print out the security descriptor type as it is automatically
...
calculated by the new make_sec_desc() function.
(This used to be commit 6fd5dc8145
)
2000-12-12 06:14:01 +00:00
Tim Potter
cbddae005f
Better error checking for ACL parsing.
...
Print an error when attempting to delete a non-existent ACL.
(This used to be commit d119782d0d
)
2000-12-12 06:06:10 +00:00
Tim Potter
34402b75b5
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.
(This used to be commit ed5bda119a
)
2000-12-07 06:05:57 +00:00
Andrew Tridgell
3eee7625b1
added a comment
...
(This used to be commit 032442802f
)
2000-12-04 07:38:06 +00:00
Andrew Tridgell
723c9b87e7
fixed the parsing again and got setting acls working with w2k
...
(This used to be commit 374d08be64
)
2000-12-04 07:27:35 +00:00
Tim Potter
54100bac69
Added some cli_errstr() calls.
...
(This used to be commit faaa71a032
)
2000-12-04 06:46:52 +00:00
Tim Potter
92abcbc040
Removed lsa lookup warnings (I'll remember).
...
Print an error if -M refers to a non-existent ACL.
(This used to be commit ee6f5a9672
)
2000-12-04 06:43:36 +00:00
Andrew Tridgell
3d43b2db28
fixed setting ACLs on directories
...
(This used to be commit 117956ecb1
)
2000-12-04 06:39:31 +00:00
Tim Potter
252e3ba128
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.
(This used to be commit 8a20318c56
)
2000-12-04 06:14:28 +00:00
Andrew Tridgell
5092ad82ba
removed SACL support (as it doesn't work with w2k if you ask for
...
SACLs)
(This used to be commit 52b27d75e1
)
2000-12-04 04:58:40 +00:00
Andrew Tridgell
576a106d03
signed/unsigned warning fixed
...
(This used to be commit 71adecd163
)
2000-12-04 03:27:02 +00:00
Andrew Tridgell
6399b62175
fixed acls set bug
...
(This used to be commit 44524958ed
)
2000-12-04 02:01:57 +00:00
Andrew Tridgell
0884d6ab52
fixed SACL bug
...
(This used to be commit 077ee4a7ac
)
2000-12-04 00:35:31 +00:00
Andrew Tridgell
a4c11729b2
- with -D only delete first match
...
- fixed delete bug
(This used to be commit 1e0d5f0695
)
2000-12-04 00:33:08 +00:00
Andrew Tridgell
0cb1c512f1
- added help
...
- added add/modify/delete/set as separate operations
(This used to be commit cb324b53c6
)
2000-12-03 12:41:28 +00:00
Andrew Tridgell
dc3251b460
cleaner parsing and default handling
...
(This used to be commit f8dbd2b799
)
2000-12-03 11:05:11 +00:00
Andrew Tridgell
3b22b74f9d
- better parsing
...
- started to add non-numeric support
(This used to be commit fd4c03aef6
)
2000-12-03 08:35:11 +00:00
Andrew Tridgell
4fee254d67
getting/setting acls now works. The SIDs are still numeric, the next
...
step is to support usernames etc
(This used to be commit 6cea1647fc
)
2000-12-03 07:36:15 +00:00
Andrew Tridgell
c93f686f01
added basic ability to dump remote file acls
...
(This used to be commit c6c90dc8e1
)
2000-12-03 05:24:16 +00:00
Andrew Tridgell
83bd929883
a prootype program for querying/setting a security decsriptor on a
...
remote machine
it is by no means complete, expect more commits soon
(This used to be commit f2f9859b70
)
2000-12-03 02:19:27 +00:00