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

413 Commits

Author SHA1 Message Date
Jeremy Allison
5baef56831 This little piece of insanity is inspired by the
fact that an NT client can open a file for O_RDONLY,
but set the create disposition to FILE_EXISTS_TRUNCATE.
If the client *can* write to the file, then it expects to
truncate the file, even though it is opening for readonly.
Quicken uses this stupid trick in backup file creation...
Thanks *greatly* to "David W. Chapman Jr." <dwcjr@inethouston.net>
for helping track this one down. It didn't bite us in 2.0.x
as we always opened files read-write in that release.
Jeremy.
-
Jeremy Allison
192887fe72 Fixed potential file descriptor leak with MS-Access fix.
Jeremy.
-
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
f952380c5d utils/torture.c: Added one more delete on close test.
smbd/notify_kernel.c: This code was wrong I believe. It was structured to only
return a changenotify event on being called from timeout processing (t != 0).
The kernel changenotify events should fire on *asynchronous* processing (EINTR
return from select caused by the realtime signal delivery) with t == 0.
Reported by Juergen Hasch (Hasch@t-online.de).
ANDREW PLEASE CHECK THIS !
Currently the hash style changenotify is done on async processing as well
as timeout processing. As this is expensive we may want to revisit doing this
and maybe set it to fire only on timeout processing.
Jeremy.
-
Jeremy Allison
54960b9c8d Added one more test - just to make sure flag can be unset.
Jeremy.
-
Jeremy Allison
a55ed1a91d Expanded delete on close test to 6 cases. I now understand the semantics of
this and the FILE_SHARE_DELETE flag exactly. The bad news is it means our
share mode handling is broken (again :-).
Jeremy.
-
Jeremy Allison
cb5963af0e Changed to using GENERIC_XX constants instead of hex values to make
delete test explicit.
Jeremy.
-
Jeremy Allison
b0266fe0a8 Added delete on close test that has allowed me to determine how w2k
behaves in this situation.
Jeremy.
-
Jeremy Allison
55fcd71eec Fix for ENOSPC from DCB.
Jeremy.
-
Jeremy Allison
42052d6079 Fix from Ryo Kawahara <rkawa@lbe.co.jp> to make SWAT correctly write and smb.conf
file in utf8.
Jeremy.
-
Jeremy Allison
29414fe0d6 groupdb/mapping.c:
include/proto.h: Fix missing (void) in proto.
rpc_server/srv_samr_nt.c: Fix user private group problem by filtering out groups that
							clash with users.
smbd/posix_acls.c: Ensure default ACE's are sensible.
utils/pdbedit.c: Fix from Simo Sorce.
Jeremy.
-
Jean-François Micouleau
287d9fb068 can delete mapping from command line now.
J.F.
-
Jean-François Micouleau
7154deb026 first pass of the new group mapping code
J.F.
-
Andrew Tridgell
a83ff172f2 added -E option (for exit on errors)
forced exclusion of filenames containing only '.' as NT rejects those
-
Andrew Tridgell
32361fc53e latest attempt at lanman1 wildcard matching -
Gerald Carter
af3f2a30c6 patches from Simo. Couple of snity things -
Jeremy Allison
96bcfdcded Added JF's new util.
Jeremy.
-
Jeremy Allison
0be41d5158 Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
-
Jeremy Allison
70beabf73b Ooops - forgot to check the rpcclient and smbcacls compile with the new
code :-(.
Jeremy.
-
Andrew Tridgell
1f8b8a7189 better handling of '.'
better verbose print
-
Andrew Tridgell
2c509c9860 remove some test code -
Andrew Tridgell
0a55d9a17b almost there with lanman1 wildcards. We now seem to correctly handle
'<', '>', '"' and '?' when combined with '.'. The '*' character is
proving troublesome.
-
Andrew Tridgell
76c8fa5cd1 I have now found that despite initial appearences the lanman1 wildcard
algorithm does *not* match separately on base and extension.

I also added a -v option to masktest for verbose output
-
Andrew Tridgell
e7ccb9be6d made some LANMAN1 wildcard progress
it now handles -M LANMAN1 -f '.x' -m '?x' nicely
-
Andrew Tridgell
85ce14f36d made some progress in masktest
it now handles the server renaming files on create
-
Andrew Tridgell
06d158d5e9 a snapshot of my attempts to get wildcard matching right for LANMAN1
clients. This is not complete and not correct - expect some more work
on this soon
-
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
c43593ad06 fixed character set init in smbw_sample -
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
56ffb58eff fixed a crash bug in smbpasswd
(the user can come from optarg, so we can't free it)
-
Andrew Tridgell
f191271986 don't need _uni hack now -
Andrew Tridgell
3eff509a65 playing with CAP_NT_SMBS -
Jeremy Allison
c0517d6f4e Merge of JohnR's changes to appliance-head, JF's changes to 2.2,
updated the POSIX_ACL code to be in sync.
Jeremy.
-
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.
-
David O'Neill
e2193c3a36 Changes from APPLIANCE_HEAD:
source/lib/smbpasswd.c
        - Only call load_interfaces() when doing a network related
          operation.  This means you can add, remove, enable or disable
          smbpasswd entries without a network.  Changing passwords always
          requires a network.
-
Richard Sharpe
d45e667a74 Needed a callback arg on cli_list ... -
Richard Sharpe
7f862e387f I need a callback arg for cli_NetServerEnum and cli_RNetShareEnum, so I had
to modifiy any routine that calls it to pass NULL and so forth.

Should have no impact. It compiles OK.
-
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.
-
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
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.
-