1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

12625 Commits

Author SHA1 Message Date
Volker Lendecke
b9ae67a3a2 That const was one too many -
Volker Lendecke
69879ceffa Implement 'net groupmap set' and 'net groupmap cleanup'.
I was rather annoyed by the net groupmap syntax, I could never get it
right.

net groupmap set "domain admins" domadm

creates a mapping,

net groupmap set "domain admins" -C "Comment" -N "newntname"

should also do what you expect.

net groupmap cleanup

solves a problem I've had two times now: Our SID changed, and a user's primary
group was mapped to a SID that is not ours. net groupmap cleanup removes all
mappings that are not from our domain sid.

Volker
-
Volker Lendecke
a3a15be5a2 And another little const -
Volker Lendecke
f1b66461eb Apply some const
Volker
-
Jeremy Allison
17c88758ae Interesting fact found by IFSTEST /t LockOverlappedTest...
Even if it's our own lock context, we need to wait here as
there may be an unlock on the way.
So I removed a "&& !my_lock_ctx" from the following
if statement.

if ((lock_timeout != 0) && lp_blocking_locks(SNUM(conn)) && ERROR_WAS_LOCK_DENIED(status)) {

Jeremy.
-
Andrew Bartlett
af1b6447b8 (merge from 3.0)
Fix bug in previous global_sam_sid() commit.  I broke the 'read from
MACHINE.SID' file functionality.

Also, before we print out the results of 'net getlocalsid' and 'net
getdomainsid', ensure we have tried to read that file, or have
generated one.

Andrew Bartlett
-
Richard Sharpe
89d810d234 Adds some more tests of renaming an open file that has been opened with
different share modes. It also has a commented out test to see if we can
actually open a renamed file, and it turns out that we can, it seems. I am
not sure at this stage how long that is the case for, though.
-
Andrew Bartlett
f3ecdea56d (merge from 3.0)
I *hate* global variables...

OK, what was happening here was that we would invalidate global_sam_sid
when we set the sid into secrets.tdb, to force a re-read.

The problem was, we would do *two* writes into the TDB, and the second one
(in the PDC/BDC case) would be of a NULL pointer.  This caused smbd startups
to fail, on a blank TDB.

By using a local variable in the pdb_generate_sam_sid() code, we avoid this
particular trap.

I've also added better debugging for the case where this all matters, which
is particularly for LDAP, where it finds out a domain SID from the sambaDomain
object.

Andrew Bartlett
-
Jeremy Allison
e46aaffe97 Fixup strange rename error case (gentest).
Jeremy.
-
Jim McDonough
d02dd0e5f5 Do the query part of the previous fix...reset time and duration are set in minutes, not seconds. Works from usrmgr. -
Jim McDonough
08a7c9697d reset time and duration are set in minutes, not seconds. Works from usrmgr. -
Jeremy Allison
755b66303d Figured out a new flags bit with gentest and ethereal....
Jeremy.
-
Jeremy Allison
9aa37cb840 More gentest fun :-). NB. I'm not fixing OpenX breakage 'cos if you look
at what W2K3 accepts here it's COMPLETELY BROKEN ! :-).
Jeremy.
-
Jeremy Allison
fc98116939 More gentest fixes.
Jeremy.
-
Volker Lendecke
9cadd14aa5 Add 'net rpc group add'. For this parse_samr.c had to be changed: The
group_info4 in set_dom_group_info also has the level in the record
itself. This seems not to be an align. Tested with NT4 usrmgr.exe. It can
still create a domain group on a samba machine.

Volker
-
Volker Lendecke
f5af0326e6 Remove unused variable.
Volker
-
Volker Lendecke
efad125f40 'net idmap restore' is too useful to be left broken :-)
Set the HWM values correctly after having manipulated the tdb.

Volker
-
Jeremy Allison
c85b617aa0 Ensure '.' and '..' don't match in delete requests.
Jeremy.
-
Jeremy Allison
f353cafa9d More gentest error fixups.
Jeremy.
-
Jeremy Allison
55f13d743e Fixup bad-path error found by gentest.
Jeremy.
-
Jeremy Allison
d236372876 Added NTrename SMB (0xA5) - how did we miss this.... ?
Jeremy.
-
Jeremy Allison
6356b79268 Fixup correct timeout values for blocking lock timeouts (tested at connectathon
by Herb).
Jeremy.
-
Andrew Bartlett
2003cdc65e (merge from 3.0)
Found by Fabien Chevalier <fabien.chevalier@supelec.fr> and
JustFillBug <mozbugbox@yahoo.com.au> on the Samba lists - a 'max
password age' of zero should be considered as 'never expire'.

For the timebeing we just set it like -1, but we might revisit this
for closer-to-ms behaviour.

Andrew Bartlett
-
Jeremy Allison
93580927dc Fix "unable to initialize" bug when smbd hasn't been run with
new system and a user is being added via pdbedit/smbpasswd.
Found at Connectathon setup.
Jeremy.
-
Jim McDonough
2fa56111d3 Add bad password count/time attributes -
Jim McDonough
51a8d050e9 Add bad password count/time attributes -
Jim McDonough
6ccb90acfd Add calls to password lockout functions. Should now work against tdbsam only. -
Tim Potter
3f3a744e92 printf -> d_printf -
Jeremy Allison
a6cb7af9ba Make SMB_FILE_ACCESS_INFORMATION call work correctly.
Jeremy.
-
Jeremy Allison
fb4249e7d1 Make us bug-for-bug compatible with W2K3 - to get delete on close semantics
on an initial open the desired_access field *must* contain DELETE_ACCESS,
simply having it map from a GENERIC_ALL won't do. Fixes delete on close test.
Jeremy.
-
Tim Potter
90ae366744 AIX has already has a function called msleep(). Bugzilla #1098. -
Jim McDonough
ad2996e418 handle both 0 and -1 as disabling
reset count and lockout duration
-
Jim McDonough
69924079b2 Make default lockout duration and
reset count time 30 minutes, to match windows, and also be valid (0 was invalid)
-
Gerald Carter
bf271b96cf <attr/xattr.h> & <sys/xattr.h> are mutually exclusive it seems; fix build on SuSE 8.2 -
Jeremy Allison
aff6bacf0e Fixup returns from lookupsids in the same way as lookupnames. Inspired by
Volkers patch.
Jeremy.
-
Gerald Carter
fb90b4140e check for <sys/xattr.h>; needed by Debian testing -
Gerald Carter
aa67c77515 remove some unused local variables -
Jim McDonough
caef425d80 Enable checking/resetting of account lockout and bad password based on policy -
Jim McDonough
81dc9d53eb Clean up bad pw count and autolock flag update fn()s -
Gerald Carter
981bd70a56 comment out server portion of DsEnumerateDomainTrusts() since it causes 2k/xp clients to fail to join the domain (see comments in srv_netlog_nt.c for details) -
Jim McDonough
91ea29b392 Add bad pw count and autolock flag update fn()s -
Gerald Carter
c275d8f831 fixing error in logic when checking flags changed field on user primary group sid -
Gerald Carter
ea83c341c9 merging smbmnt fix from 3.0 -
Jim McDonough
22c312b31d Add bad password reset and display of bad password count/time -
Jim McDonough
0a2b792556 Add functions to get/set bad password time -
Jim McDonough
9f496e113c Add bad password time fields -
Simo Sorce
cd48827418 reformatting -
Jeremy Allison
f3e51dbc21 Fix the "too many fcntl locks" scalability problem raised by tridge.
I've now tested this in daemon mode and also on xinetd and I'm pretty
sure it's working.
Jeremy.
-
Jeremy Allison
0ac64c8b4d Fix based on Volker's code to correctly return code from lsa_lookup_sids
on unmapped sids.
Jeremy.
-
Volker Lendecke
f90c590731 When creating a group via a script, don't let winbind do it as well.
Volker
-