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

967 Commits

Author SHA1 Message Date
Richard Sharpe
fc62b9fcc1 r501: Fix a small cut-n-pasteo ...
(This used to be commit b1825184d313b97c7fa232990f60962aa86e7e17)
2007-10-10 10:51:26 -05:00
Stefan Metzmacher
f880fe51b3 r340: fix a segfault in the login_cache code...
metze
(This used to be commit 908d8a412559997256f51caa30da254f0768f114)
2007-10-10 10:51:20 -05:00
Volker Lendecke
0d6acfe19a r316: Fix split_domain_name. This defaulted to get_myname() instead of
get_global_sam_name().

Error case: Adding a domain user to a XP local group did a lsalookupname on
the user without domain prefix, and this then failed.

Jerry: This is a must-fix before 3.0.3.

Volker
(This used to be commit f35e353454b6825da1de138a3f0d8106787e938b)
2007-10-10 10:51:18 -05:00
Gerald Carter
8ad3d8c9b0 r196: merging struct uuid from trunk
(This used to be commit 911a28361b9d8dd50597627f245ebfb57c6294fb)
2007-10-10 10:51:13 -05:00
Volker Lendecke
69a91df4ed r145: pdb_create_alias now returns NTSTATUS. More of this to follow.
Volker
(This used to be commit 6e18bed17093e0b1792f68817096e64e0e841f26)
2007-10-10 10:51:11 -05:00
Gerald Carter
7af3777ab3 r116: volker's patch for local group and group nesting
(This used to be commit b393469d9581f20e4d4c52633b952ee984cca36f)
2007-10-10 10:51:10 -05:00
Jim McDonough
a15393a3d9 r53: Remove modifyTimestamp from list of our attributes. We just check it for
cache entry time comparisons in password lockout.  Fixes problems where
pdb_ldap tries to delete the operational attribute modifyTimestamp when
deleting a user account.
(This used to be commit 5ebcb9081e435d54c39d4d3a1ef1d7b651ccb53f)
2007-10-10 10:51:06 -05:00
Jeremy Allison
7226511ead r48: Fix types for debug message parameters.
Jeremy.
(This used to be commit 85d9c92fd53a65fccca3720a3b06d69ef28f9981)
2007-10-10 10:51:05 -05:00
Gerald Carter
931df5850e r39: * importing .cvsignore files
* updateing WHATSNEW with vl's change
(This used to be commit a7e2730ec4389e0c249886a8bfe1ee14c5abac41)
2007-10-10 10:51:05 -05:00
Volker Lendecke
95bd9b5ab0 Apply some const
(This used to be commit aa220cffa7b3507452ffed51c048333c7cde0ca2)
2004-03-31 15:21:48 +00:00
Volker Lendecke
9d1a4e8013 Remove some unused code
(This used to be commit 2b757b6adf0b4e5c799cc8943e8fd96cc94c24bc)
2004-03-31 14:36:25 +00:00
Jim McDonough
2732b702fb Use timegm, or our already existing replacement instead of timezone, as
some platforms (FreeBSD in this case) don't define timezone according to
posix.  This is what I wanted to do anyway.

Spotted by Andrzej Tobola <san@iem.pw.edu.pl>
(This used to be commit bc13e35db0b8b265f87553d4df1c7326710cb3fa)
2004-03-25 18:25:41 +00:00
Jeremy Allison
a79b205d92 Fix gcc warnings. Fix mkproto with new type.
Jeremy.
(This used to be commit 00fa66df3edeb92ec5efd49bd61f98691e74877a)
2004-03-19 01:29:14 +00:00
Jim McDonough
357998ddbd Password lockout for LDAP backend. Caches autolock flag, bad count, and
bad time locally, updating the directory only for hitting the policy limit
or resetting.

This needed to be done at the passdb level rather than auth, because some
of the functions need to be supported from tools such as pdbedit.  It was
done at the LDAP backend level instead of generically after discussion,
because of the complexity of inserting it at a higher level.

The login cache read/write/delete is outside of the ldap backend, so it could
easily be called by other backends.  tdbsam won't call it for obvious
reasons, and authors of other backends need to decide if they want to
implement it.
(This used to be commit 2a679cbc87a2a9111e9e6cdebbb62dec0ab3a0c0)
2004-03-18 19:22:51 +00:00
Jim McDonough
3d18997afd Get MungedDial actually working with full TS strings in it for pdb_ldap.
I know this isn't pretty, but neither was our assumption that all strings
from the directory fit inside a pstring.  There was no way this worked
before will all versions of usrmgr (for example, the only version of
mine that has the TS Confic button).
(This used to be commit d275c0e384db08c2a6efc28e52844f676ff71fb6)
2004-03-11 16:32:19 +00:00
Volker Lendecke
b3b93aaa3f Get us a little closer to Windows LSA semantics.
A windows DC does not reply to DCNAME\\Administrator, only to
DOMAIN\\Administrator. Fix that.

Without winbind we are wrong as domain members, we should forward the request
DOMAIN\\Username to the DC on behalf of the asking client. Winbind fixes that
nicely.

Volker
(This used to be commit 7ed61edbbedbdee25f750aa30c13479764aa1af2)
2004-03-07 08:22:06 +00:00
Volker Lendecke
e692b991d1 And another little const
(This used to be commit f6bb3304fc5ef298a921b9ee5ad2f6444b0e72bc)
2004-02-26 11:07:06 +00:00
Andrew Bartlett
9e2a098a0a 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
(This used to be commit 191b43159e7358541be9a3deac8c447885145442)
2004-02-25 23:12:29 +00:00
Andrew Bartlett
56bd63b1cd 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
(This used to be commit 86ad04d26d3065a99b08afaaf2914968a9e701c5)
2004-02-25 22:01:02 +00:00
Andrew Bartlett
06549b8886 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
(This used to be commit 9ffc490fce215dcaed8ebfc1db85f5017a692ca4)
2004-02-23 21:09:09 +00:00
Jim McDonough
9264194340 handle both 0 and -1 as disabling reset count and lockout duration
(This used to be commit 84fe24e64ee405bb25878c1e5fdf50592eb75f73)
2004-02-20 16:00:25 +00:00
Jim McDonough
222d9a3ce2 Clean up bad pw count and autolock flag update fn()s
(This used to be commit 9a79f9fbcb43085e419dbccd670a54256d01cb4b)
2004-02-19 21:37:24 +00:00
Jim McDonough
e507a83617 Add bad pw count and autolock flag update fn()s
(This used to be commit 600fcd534b6e101b6a12774946b0e9814c6f54a8)
2004-02-19 18:35:43 +00:00
Jim McDonough
39a154ae92 Add functions to get/set bad password time
(This used to be commit 557f598c63f64c1c5b982a9057c0eea2a2ff2ee5)
2004-02-19 15:59:35 +00:00
Jim McDonough
d21f23e01f Move tdbsam versioning/upgrade code into 3.0
(This used to be commit 730c07cac2166812f4a2da5cfba7152d168b2bdd)
2004-02-13 14:48:20 +00:00
Jim McDonough
041f03151c Try to remove the last vestiges of unknown_3...
Jelmer, can you look at the sql and xml backends please to verify?
(This used to be commit b7706f7e258516d83646aca8c367508bc1c8f0dd)
2004-02-12 19:09:21 +00:00
Gerald Carter
eaece3bbe6 abartlet's pdb_set/changed flag fix for NULL passwords
(This used to be commit cfe80f0df7ecfa6c689b03b9bed80ea80701a4c1)
2004-02-12 17:51:23 +00:00
Gerald Carter
b6a320bdc1 stupid cut-n=paste error; my fault
(This used to be commit ee8f142b874a5bd365e59f68fb48ff3fec82fcda)
2004-02-12 17:09:01 +00:00
Jim McDonough
1fa1e931a3 More sync between passdb on 3.0 and HEAD.
Replace unknown_3 with fields_present.  Also causes rpc_samr structure field changes.
(This used to be commit 1976843345efb6ca4f9cebd964a61acd8ae11d41)
2004-02-12 16:16:53 +00:00
Jim McDonough
34232f9ec0 Start of merging HEAD changes. Right now, just move one fn() to eliminate
the prototype at the beginning, and change some comments so diffs to HEAD
aren't filled with useless info.
(This used to be commit 7b40f6c464ecbd40ab3fdf32b53da1e61475d2e7)
2004-02-12 15:20:40 +00:00
Gerald Carter
a6a2a69680 updates for tdbsam code to help make merge into head easier; needs a bit more testing tomorrow but initial results seem ok
(This used to be commit daee8d7feee4a08d6c204e2de3f346b6d10640e6)
2004-02-12 05:07:44 +00:00
Jeremy Allison
16733020e3 Don't set an iterator to a piece of free'd memory, store it first.
Jeremy.
(This used to be commit e914230a2d1a7b515bd7859d655d6555b7d3e67e)
2004-02-11 22:47:12 +00:00
Gerald Carter
da52004988 fix set/getsampwent iterator in tdbsam to use an allocated list
(This used to be commit 8734d91cd7681219f1389e3c41979028eadbb7fe)
2004-02-11 21:10:04 +00:00
Volker Lendecke
24f2e0cc3e And another build fix.
Volker
(This used to be commit 6c78a096a5c4a8ae21e846505f6ac2df826d5cbd)
2004-02-09 15:21:42 +00:00
Volker Lendecke
42f763e6f0 Fix the build & get rid of a compiler warning.
Volker
(This used to be commit 38c9b775ce029e1d480d89d4adb0d1bd45a28fe6)
2004-02-09 14:43:18 +00:00
Andrew Bartlett
46975eb92f When we set a domain sid, force get_global_sam_sid() to do it's work again.
This should ensure that the value it returns is always consistant.

Andrew Bartlett
(This used to be commit a4392ede33019b7584bf6a2d8445adb5191e640f)
2004-02-08 11:05:34 +00:00
Andrew Bartlett
b401888b6b Add static, and assert that we will never overflow the static fstring
in pdb_encode_acct_ctrl()  (All current callers are fine)

Andrew Bartlett
(This used to be commit 01be89eb438567cfe0a002a247fe2d314b01f9da)
2004-02-08 11:02:11 +00:00
Andrew Bartlett
d198c55877 Make more functions static, and remove duplication in the use of functions
in lib/smbpasswd.c that were exact duplicates of functions in passdb/passdb.c

(These should perhaps be pulled back out to smbpasswd.c, but that can occour
later).

Andrew Bartlett
(This used to be commit fcdc5efb1e245c8fa95cd031f67ec56093b9056e)
2004-02-08 08:38:42 +00:00
Gerald Carter
471e558b28 move disabling code to context functions instead of backwards compatible wrappers
(This used to be commit e62ef2ba2d73f492d879af4d06b223f8e739dc6c)
2004-02-04 19:46:29 +00:00
Andrew Bartlett
f125759072 Fix const warning
(This used to be commit 7a36cc4ac0ff4d9c42eb9ddaf41bf33b4e8cd7c6)
2004-02-04 11:41:22 +00:00
Andrew Bartlett
9751ccf2af If we are setting the NT or LM password to NULL, remove the attribute
rather than writing XXXXX

Andrew Bartlett
(This used to be commit ab7dd748a98361ac9c1c3ca52e9a97aee3f93e6f)
2004-01-30 23:37:38 +00:00
Gerald Carter
3141a26677 disable any account that doesn't have a password and doesn't had the ACB_PWNOTREQ bit set
(This used to be commit 52bf070b10ca99be7e4b9d1b5e32f69d2667d8f4)
2004-01-30 14:59:40 +00:00
Gerald Carter
d4420dc902 more initialization fixes
(This used to be commit 9e590d603547ef1e8388bea66eb5d44e4dfd6412)
2004-01-29 22:16:58 +00:00
Gerald Carter
6566a89bee initialization fixes
(This used to be commit 54fd3992c385fd6208c061131b2c98e448baf2c2)
2004-01-29 20:14:50 +00:00
Rafal Szczesniak
9919ab60ea Typo fix.
rafal
(This used to be commit 5d7f81eea2f3d9ba59eb549a45de030b0a277263)
2004-01-07 22:44:28 +00:00
Andrew Bartlett
43a4e1dbf9 Don't duplicate pulling the 'IPC' username from secrets.tdb, instead
just use one function for both places.

Andrew Bartlett
(This used to be commit 85da181e8a0ade839f6d595fabdf4cea606f82e1)
2004-01-07 10:11:24 +00:00
Gerald Carter
29b4959815 isolate ldap debug messages to the common smbldap_XXX() functions
(This used to be commit 7d7a262f45182e67daecdca49df85445c2b9700a)
2004-01-06 18:26:18 +00:00
Jelmer Vernooij
430f9abd5f - Put functions for generating SQL queries in pdb_sql.c
- Add pgSQL backend (based on patch by Hamish Friedlander)
- Use query generate functions from pdb_mysql and pdb_pgsql
- Only pdb_pgsql.c needs to be changed whenever the fields in SAM_ACCOUNT change
(This used to be commit 65ad2c02fd2bf36d535c279ad290ab81e39f6816)
2004-01-04 21:09:42 +00:00
Andrew Bartlett
b4593e92ff JHT came up with a nasty (broken) torture case in preparing examples for
his book.

This prompted me to look at the code that reads the unix group list.  This
code did a lot of name -> uid -> name -> sid translations, which caused
problems.  Instead, we now do just name->sid

I also cleaned up some interfaces, and client tools.

Andrew Bartlett
(This used to be commit f9e59f8bc06fae7e5c8cb0980947f78942dc25c0)
2004-01-02 05:32:07 +00:00
Andrew Bartlett
66f039d58c Check the return value of string_to_sid in a few more places. (But
string_to_sid also needs to be less permissive on what it thinks are
valid sids...)

Andrew Bartlett
(This used to be commit 9080c30de8aa96ed3b9b121ca111f1632572754e)
2003-12-26 03:14:31 +00:00