summaryrefslogtreecommitdiffstats
path: root/source/passdb/machine_sid.c
Commit message (Collapse)AuthorAgeFilesLines
* r13316: Let the carnage begin....Gerald Carter2007-10-101-1/+2
| | | | Sync with trunk as off r13315
* r12051: Merge across the lookup_name and lookup_sid work. Lets see how the ↵Volker Lendecke2007-10-101-0/+24
| | | | | | | | build farm reacts :-) Volker
* r7577: switching to macro for IS_DCGerald Carter2007-10-101-15/+4
|
* r6263: Get rid of generate_wellknown_sids, they are const static and ↵Volker Lendecke2007-10-101-2/+0
| | | | | | | | initializable statically. Volker
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-1/+1
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* r1492: Rework our random number generation system.Andrew Bartlett2007-10-101-1/+1
| | | | | | | | | | On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork(). For other systems, we now only re-seed after a fork, and on startup. No need to do it per-operation. This removes the 'need_reseed' parameter from generate_random_buffer(). Andrew Bartlett
* Fix bug in previous global_sam_sid() commit. I broke the 'read fromAndrew Bartlett2004-02-251-1/+0
| | | | | | | | | | 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
* I *hate* global variables...Andrew Bartlett2004-02-251-30/+37
| | | | | | | | | | | | | | | | | | 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
* Fix the build & get rid of a compiler warning.Volker Lendecke2004-02-091-1/+1
| | | | Volker
* When we set a domain sid, force get_global_sam_sid() to do it's work again.Andrew Bartlett2004-02-081-0/+7
| | | | | | This should ensure that the value it returns is always consistant. Andrew Bartlett
* Better panic cleanly than segfault later when no sid can be found and created.Volker Lendecke2003-06-181-2/+3
| | | | | | | Everybody who calls get_global_sam_sid expects this to return non-NULL, and there are way too many places where this is called. Volker
* Merge from HEAD - save the type of channel used to contact the DC.Andrew Bartlett2003-04-211-4/+11
| | | | | | | | | | | This allows us to join as a BDC, without appearing on the network as one until we have the database replicated, and the admin changes the configuration. This also change the SID retreval order from secrets.tdb, so we no longer require a 'net rpc getsid' - the sid fetch during the domain join is sufficient. Also minor fixes to 'net'. Andrew Bartlett
* Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison2002-11-121-4/+3
| | | | | | dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy.
* sync'ing up for 3.0alpha20 releaseGerald Carter2002-09-251-6/+5
|
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-13/+40
|
* Fix from Stefan "metze" Metzmacher <metze@metzemix.de> to prevent usJeremy Allison2002-04-021-0/+5
| | | | | overwriting an old MACHINE.SID sid. Jeremy.
* Remove a stub function I forgot to fill in.Jeremy Allison2002-03-131-6/+0
| | | | Jeremy.
* Removed unused var.Jeremy Allison2002-03-121-1/+0
| | | | Jeremy.
* Ensure, if we're a PDC or BDC, that the SID stored for the domain nameJeremy Allison2002-03-121-10/+70
| | | | | and the machine name are identical. Jeremy.
* rewrote the machine sid storage code to store the SID in secrets.tdbAndrew Tridgell2002-03-101-208/+63
| | | | | | | rather than MACHINE.SID. We try to load MACHINE.SID only if we can't fetch the SID from secrets.tdb This also fixes the value of global_sam_sid for the DC/non-DC case
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Use lp_private_dir() not magic on the lp_smb_passwd_file() output.Andrew Bartlett2001-09-191-7/+2
|
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-1/+1
| | | | can't redefine them. damn.
* Large commit which restructures the local password storage API.Gerald Carter2000-11-131-0/+260
Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+) are broken, but they were somewhat broken before. :) The following functions implement the storage manipulation interface /*The following definitions come from passdb/pdb_smbpasswd.c */ BOOL pdb_setsampwent (BOOL update); void pdb_endsampwent (void); SAM_ACCOUNT* pdb_getsampwent (void); SAM_ACCOUNT* pdb_getsampwnam (char *username); SAM_ACCOUNT* pdb_getsampwuid (uid_t uid); SAM_ACCOUNT* pdb_getsampwrid (uint32 rid); BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass); BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override); BOOL pdb_delete_sam_account (char* username); There is also a host of pdb_set..() and pdb_get..() functions for manipulating SAM_ACCOUNT struct members. Note that the struct passdb_ops {} has gone away. Also notice that struct smb_passwd (formally in smb.h) has been moved to passdb/pdb_smbpasswd.c and is not accessed outisde of static internal functions in this file. All local password searches should make use of the the SAM_ACCOUNT struct and the previously mentioned functions. I'll write some documentation for this later. The next step is to fix the TDB passdb backend, then work on spliting the backends out into share libraries, and finally get the LDAP backend going. What works and may not: o domain logons from Win9x works o domain logons from WinNT 4 works o user and group enumeration as implemented by Tim works o file and print access works o changing password from Win9x & NT ummm...i'll fix this tonight :) If I broke anything else, just yell and I'll fix it. I think it should be fairly quite. -- jerry