summaryrefslogtreecommitdiff
path: root/source3/passdb
AgeCommit message (Collapse)AuthorFilesLines
1998-08-17moved connection_struct handling code into smbd/conn.c and changed itAndrew Tridgell1-4/+4
to a linked list with bitmap format. (This used to be commit b7aaab1b6b2d2f72b2bb7c11f5c7bf081a6093d9)
1998-08-15use user instead of this_user to prevent global shadowingAndrew Tridgell1-18/+18
(This used to be commit 76e523907c2ee51031341c3cef9e9f6b5b2d9dc4)
1998-08-15configure: Changes for extra headers.Jeremy Allison2-6/+6
configure.in: Source for header changes. client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile. include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers. include/includes.h: Headers for the above. include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int). lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/debug.c: Fixed signal functs. lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile. libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem_sysv.c: Fixed error messages in sysV stuff. nmbd/asyncdns.c: Fixed signal functs. nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/nttrans.c: Fixed fsp code path. smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem. smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/trans2.c: Fixed core dump bug. smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile. Jeremy. (This used to be commit 1b9cbcd02e575dc0a95fa589f720df30a4acc46b)
1998-08-14this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1-2/+2
Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep. (This used to be commit c7ee025ead4a85b6fa44a832047b878451845fb6)
1998-08-10split the system password checking routines out of smbd/password.c andAndrew Tridgell1-0/+950
into passdb/pass_check.c. This means SWAT no longer needs to link to smbd/password.c (This used to be commit 90d93889d722670cbb517017531264630af759bf)
1998-07-31As per a Andrew's message, I went through and removed the timestring()Christopher R. Hertel1-6/+6
timestamps from several DEBUG messages. The timestamps are redundant now that DEBUG() provides them automatically. There are still a few more files to do, but I've got to get home for dinner. Chris -)----- (This used to be commit 60286ccecaa6028d687e6406755016455e3b3a26)
1998-07-29merge from the autoconf2 branch to the main branchAndrew Tridgell5-162/+166
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
1998-06-27nisppass.c: Fixed incorrect parameter usage.Jeremy Allison1-1/+1
nmbd_become_lmb.c: Add 'force_new_election' parameter to some functions. This allows the start of the election to be done *after* the demotion from local master browser is done. Also changed code so release of 1d name is done immediately to allow other local master to gain it. nmbd_elections.c: Ensured no elections are run until we have registered the WORKGROUP<1e> name that we must listen on to participate in elections. nmbd_incomingdgrams.c: Use force_new_election code. nmbd_namelistdb.c: Make update_name_in_namelist static. nmbd_subnetdb.c: Fix bug in comparison function. We cannot use memcmp as structure packing may make this fail. nmbd_packets.c: Ensure that we only send one release packet when sending a broadcast packet. nmbd_workgroupdb.c: Ensure we put the correct value in the ElectionCriterion field. nmblib.c: Ensure make_nmb_name zero's the struct nmb_name. Jeremy. (This used to be commit 1fcb094ba04f01be1261ac92198c25b21b0d5ad5)
1998-06-20clitar.c: Fixed minor gcc -pedantic-error compile warnings.Jeremy Allison1-0/+2
passdb.c: Fixed stupid bug in read_sid_from_file(). Jeremy. (This used to be commit e65efe3f78240a4fa1ed7931e96c6fb698d9d8c8)
1998-06-04includes.h: Fixes for NetBSD and BSDI.Jeremy Allison1-2/+2
smbpass.c: Fixed irix warnings. Jeremy. (This used to be commit 2caefb35ff56dba67968d04755d74238a38ba29d)
1998-06-01clientutil.c: Don't core dump if no controlling terminal available for password.Jeremy Allison2-8/+26
passdb.c: lib/rpc/include/rpc_misc.h: First cut at automatic uid/gid to rid mapping. We can change this at a later date to make more bits available if neccessary. Jeremy. (This used to be commit 34f40474aba97118e1e80fe6259c686e46dc16b4)
1998-05-28latest messing about: probably doesn't compile; doesn't matter.Luke Leighton1-3/+54
(This used to be commit d455d194b7110d4bcbef58134d035bd55702b6f8)
1998-05-27loadparm.c: Added machine password timeout parameter - set to 7 days be default.Jeremy Allison2-4/+16
password.c: Added code to tell server.c when machine password needs changing. server.c: Change machine password in idle cycles if it needs it. smbpassfile.c: Fixed up length calculations for machine password file. smbpasswd.c: Moved domain joining code/machine password changing code. lib/rpc/client/cli_netlogon.c: And this is where it now lives. Jeremy. (This used to be commit b8fedca6191de96159df0d1d17082d82e8e44773)
1998-05-26smb.h: More NT SMB stuff (just defines).Jeremy Allison1-1/+2
smbpass.c: Do *NOT* make this function static. It breaks the compile on gcc util.c: Getting closer to MS wildcard semantics. A trailing '*' matches any trailing dot-separated components. trans2.c: Removed hacks that change multiple '?' -> '*' as this breaks things now. trans2.h: Removed NT_FILE_ATTRIBUTE_NORMAL - now FILE_ATTRIBUTE_NORMAL is defined in smb.h. Jeremy. (This used to be commit 42a65511068cd9006350c80bbed2f346f3f01cb0)
1998-05-25added set logon, logoff, kickoff etc time functions.Luke Leighton2-8/+42
(This used to be commit dab9728a4376cc52d6e53b09b5f42d08712330d6)
1998-05-25i wondered why nisppass.c came up with a linker error "pdb_set_last_set_time"Luke Leighton1-5/+0
not found. this gave me a clue... #if 0 /* commented out until someone uses them jra */ ... #endif (This used to be commit d553901b9a21c4917058fc6838aaf73eb9a1c8cc)
1998-05-24- created pdb_sethexpwd(), to be called from all pwd apis that need toLuke Leighton3-46/+81
store passwords in ascii format - dealt with lots of signed/unsigned char thingies spotted by Tim Winders. (This used to be commit bd825f1ef15c4bf12aeba945f8bfdc7fd0e14d25)
1998-05-22add_nisp21pwd_entry() finished but not tested. module now compiles.Luke Leighton1-107/+77
(This used to be commit c74d0defcf8e9fca326af190730439f6451f826a)
1998-05-22doesn't compile: don't care. checking this in so people can see what'sLuke Leighton1-19/+107
going on. (This used to be commit b7ccea8ee190a228cf479f325a2c8578e2bd90ce)
1998-05-21fixed signed / unsigned warnings spotted by tim winders. also fixedLuke Leighton2-2/+2
unnecessary "address of" warnings. (This used to be commit ed0afe1e186ce53046e70d8a92103d4f59a2eed2)
1998-05-19passdb.c: Fixed typo in coment.Jeremy Allison2-2/+6
smb.h: Removed comments no longer valid. smbpass.c: Stopped dummy function from being prototyped. util.c: Fix for multibyte char problems with strlower, strupper and string_replace. Jeremy. (This used to be commit cd244b45a5d35fceee2a4034b0c6aabdb58871aa)
1998-05-19made mod_smbfilepwd_entry() and getsmbfilepwent() static. they need notLuke Leighton1-98/+97
be exposed. (This used to be commit 61ab72b82b24006c69b573400f740ff73e742b32)
1998-05-19oops - got some of the default (conversion) functions wrong.Luke Leighton1-32/+19
(This used to be commit b836581cda2b58d285245f71f2bc419c6ece4911)
1998-05-19removed "default" system for password database api: all functions mustLuke Leighton4-195/+176
be supported. there are some stub routines in passdb.c which can be copied into a password database api which do conversion. the module writer can choose which of these to provide full support for instead of using the conversion routines. (This used to be commit d906ac5941fa22f93a38d65906b89a80f971b83c)
1998-05-19ldap.c :Luke Leighton4-88/+286
- added support for some of the new passdb_ops functions. - removed functions that are supported "indirectly" through passdb.c nisppass.c : - modified make_nisname_from_xxx() functions to take a "file" arg. - turned getnisp21pwuid() into getnisp21pwrid(). getnisp21pwuid() functionality is available through "indirect" support in passdb.c - removed functions that are supported "indirectly" through passdb.c - added support for some of the new passdb_ops functions. passdb.c : - created getsam21pwrid() function to go alongside getsam21pwuid. it is not expected that getsam21pwuid ever be used, certainly not from the lib/rpc code. - created getsamdisprid() and getsamdispent(). these are primarily for support of SamrQueryDisplayInfo, however given that they [struct sam_disp_info] return username, rid and fullname, there may be further instances where these functions will be useful. - added support where either the get/add/mod-smb or get/add/mod-sam21 functions are optional. this can be done very easily by checking whether the struct passdb_ops table functions are NULL or not. documented this capability in the notes at the top of the module. - where unix uid was referenced, use uid_t. - where unix gid was referenced, use gid_t. smb.h : - added sam_disp_info functions to passdb_ops. - added getsam21pwrid() function. smbpass.c : - added reference to iterate_getsam21pwrid(). lib/rpc/server/srv_samr.c : - removed group rid code added to get_user_info_21() code: this had been added in the wrong place. the client / server should already know whether it wants to do a lookup by user rid or by group rid. the test of whether the rid is a user or group rid has been left in because this may become useful consistency-check code. - converted back to getsam21pwrid() not getsam21pwuid(pdb_user_rid_to_uid()). this is because the unix uid to user rid mapping can be non-monotonic in some password database systems, and monotonic in others. imposing the restriction by converting immediately from rid to uid at this point is inadviseable, and will place this potential restriction on _all_ password database systems, not just some which, for whatever reason, do not support user rids. it should be up to the individual password database writer to convert from user rid to unix uid, should that module not support rids. lib/rpc/server/srv_util.c : - got lookup_user_name() to call getsamdisprid() not getsmbpwuid(). a bug was introduced (or at least the bug already there was not fixed) whereby the nt user rid was converted to a unix uid, and then not used. (This used to be commit 0193dd21c3c44e0611add742c6f92b92474de6b8)
1998-05-18Abstracted all the crappy password interfaces through an indirectJeremy Allison4-293/+274
function table, selectable at compile time. This should make the code that implements all the password functions much cleaner, as it's now very clear exactly what a particular password database needs to provide to Samba. Jeremy. (This used to be commit 27ca536ad974242524c12f7100e419d9e7f9647f)
1998-05-18chgpasswd.c: Changed back to getsmb... from getsam...Jeremy Allison4-280/+341
ldap.c: Stoped dummy_function being prototyped. loadparm.c: Fixed slprintf sizes. nisppass.c: Fixed safe_strcpy sizes. nmbd_processlogon.c: Changed back to getsmb... from getsam... nttrans.c: Just a dump of new code. passdb.c: Moved stuff around a lot - stopped any lookups by rid. This needs to be indirected through a function table (soon). password.c: Changed back to getsmb... from getsam... reply.c: Changed back to getsmb... from getsam... slprintf.c: Fixed prototype problems. smb.h: Fixed prototype problems. smbpass.c: Changed to getsmbfile.... smbpasswd.c: Changed back to getsmb... from getsam... lib/rpc/server/srv_netlog.c: Changed back to getsmb... from getsam... lib/rpc/server/srv_samr.c: Fixed rid lookup - use uid or gid lookup. lib/rpc/server/srv_util.c: Changed back to getsmb... from getsam... Jeremy. (This used to be commit 7d332b2493d2089d09521250fc9b72d8953307c0)
1998-05-18linker errors with -DUSE_NISPLUS_DB - difficult to spot when you're notLuke Leighton2-4/+4
using nis+ on your system, so you get 100 linker errors... (This used to be commit e325d9a81039152e8c57f7fab6cf948d8e1ec7d3)
1998-05-18sorting out removal of some smb_passwd functions by calling pdb_smb_to_sam()Luke Leighton1-10/+11
instead, for use by nisppass.c (This used to be commit 2253ca407267eb161cfcd8b53dcc9848d9398f4c)
1998-05-18removed references to some of the smb_passwd routines from ldap and nis+Luke Leighton2-111/+91
code, use pdb_sam_to_smb(...sam21...) calls instead. this is a lot simpler. (This used to be commit d92f4e71c12ce5010f05fa7dd3918a48e7386d1e)
1998-05-18creating and using some pdb_init_(sam/smb) routines. putting ldap headersLuke Leighton3-25/+10
back in (they had been taken out of includes.h because they are only local to ldap.c. (This used to be commit 98ab085b93fb25a4d9275c0d54a863fd9fae2548)
1998-05-18no include headers in ldap.c.Luke Leighton2-0/+72
passdb.c sam_passwd <-> smb_passwd conversion routines (This used to be commit 8082239c81dfed5e3cc34a4d0a4e7195398ae627)
1998-05-18resolving compilation errorsLuke Leighton3-3/+6
(This used to be commit dea0c06eec44a7c2860f97d8f23584d30e482e0a)
1998-05-18received update from jean francois for ldap.c: he is doing add / modLuke Leighton1-71/+424
functions (This used to be commit 381df1e52bfc97b80422de2703db8cb521dc47e1)
1998-05-18- renamed some of the passdb.c functions: they have a prefix pdb_ on themLuke Leighton3-300/+319
- split smbpass.c "password file lock" routines into smbpassfile.c: moved trust account routines into smbpassfile.c as well (This used to be commit 3e48b4eb113cc5e1c6794d7ac699fd9ac47c654a)
1998-05-18oops. pressed ctrl-z while editing the previous cvs message: this wasLuke Leighton1-19/+105
taken to mean ":x". (This used to be commit 660206e816f9be708e09a1aad3b342b94e5e4f53)
1998-05-18Makefile:Luke Leighton4-145/+488
- added nisppass.c and NISPLUS_FLAGS includes.h: - renamed USE_LDAP to USE_LDAP_DB. renamed NISPLUS to USE_NISPLUS_DB. added default define of USE_SMBPASS_DB. - removed ldap headers: they are local only to ldap.c ldap.c : - made all ldap-specific functions static. - added dummy sam21 functions loadparm.c : - renamed NISPLUS to NISPLUS_HOME mkproto.awk - commented out ldap-specific #ifdef generation code: it's not needed now that ldap-specific functions in ldap.c are static nisppass.c : - first attempt at an add function from (This used to be commit f215d375f0f1e12894c2a9e86bd28d4776d337c1)
1998-05-15some databases have search capabilities. acknowledging this in designLuke Leighton1-19/+60
of passdb.c api. (This used to be commit 2dd01b7c70f7e1f3158bd4bc75459892007e5418)
1998-05-15first non-compiling, unused, mostly stub version of NIS+ password database.Luke Leighton1-0/+330
based on Benny Holmgren's samba patch (copyright acknowledged). (This used to be commit 2a87cf09572bd2154d4b373e1aa2171106e96da7)
1998-05-14passdb.cJeremy Allison1-0/+192
server.c: Moved generate_machine_sid() into passdb.c for Jean-Francois (who might want an LDAP version). Changed locking to free exclusive lock as soon as possible to prevent contention. lib/rpc/parse/parse_samr.c lib/rpc/server/srv_samr.c: Changed last SID-as-string manipulation function to use DOM_SID structure. Jeremy. (This used to be commit 3b8f5aef57b4f37265c0403385053085f0df6f18)
1998-05-14namequery.c: Fixed SGI IRIX 5.x compiler problem.Jeremy Allison1-4/+4
server.c: Added MACHINE.SID file generation - use lp_domain_sid() be default. smbpass.c: Exposed do_file_lock() as I now use it in server.c Jeremy. (This used to be commit 5bf17840ac7d65d08dd3fdfe8b789010488f6808)
1998-05-13initialise a variableAndrew Tridgell1-1/+1
(This used to be commit 1c052f8744c3f1f64638eb4c0ea7b0db39d50040)
1998-05-12- removed ldap_get_trust()Luke Leighton1-101/+74
- #ifdef around putting 16 byte hashes instead of plaintext password. (This used to be commit ca7bf597e4781ee1a82dc231584b16624d99e9f3)
1998-05-12removed lp_domain_workstation() parameterLuke Leighton1-1/+1
(This used to be commit 80d6a3bb0cf3853aa51594cce888e6c0a6e6f634)
1998-05-12This is a security audit change of the main source.Jeremy Allison2-27/+28
It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy. (This used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)
1998-05-11password back-end database supportLuke Leighton3-13/+140
ldap.c : - added getldap21pwent() function passdb.c : - getsam21pwent() no longer a stub: calls ldap21 or smb21 smbpass.c : - added getsmb21pwent() function (he he :-) lib/rpc/server/srv_samr.c : - removed "specific" calls to ldap functions; replaced with call to get_sampwd_entries instead (which is unfinished). - rewrote get_user_info_21 function to call getsam21pwrid. (This used to be commit c760ebbf127796427c4602aae61952df938c6def)
1998-05-11ldap back-end database developmentLuke Leighton3-401/+596
Makefile: created PASSBD_OBJ group includes.h: added #ifdef USE_LDAP to #include <ldap> headers ldap.c: - renamed "_machine" to "_trust" everywhere. - added sam_passwd support routines - removed get_ldappwd_entry function: replaced with get_sampwd_entry - removed getldappwnam/uid: replaced with getsampwnam/uid - other messing about bits which are probably going to annoy the hell out of jean-francois (sorry!) mkproto.awk: - added stuff to wrap ldap.c protos with #ifdef USE_LDAP - added uid_t and gid_t return results to the prototype generation passdb.c: - created getsam21pwent, add_sam21pwd_entry, mod_sam21pwd_entry. - modified getsampwnam/uid and created getsam21pwnam/rid functions to replace the local get_smbpwd_entry() and get_ldappwd_entry() functions, which jeremy didn't like anyway because they were dual-purpose. - added utility routines which are or may be useful to all the password database routines. password.c: - renamed "machine_" to "trust_" everywhere. smbpass.c: - removed get_smbpwd_entry function: replaced it with get_sampwd_entry functions in passdb.c - moved code that decoded acct_ctrl into passdb.c - moved encode_acct_ctrl into passdb.c - removed getsmbpwnam/uid: replaced with getsampwnam/uid - renamed "machine_" to "trust_" everywhere. smbpasswd.c: - renamed "machine_" to "trust_" everywhere. util.c: - moved gethexpwd function into passdb.c lib/rpc/server/srv_util.c: - moved user_rid_to_uid, group_rid_to_rid etc etc into passdb.c (This used to be commit 673ab50c4c2c25db355d90efde3a6bfbb4d8369e)
1998-05-11changed to use slprintf() instead of sprintf() just aboutAndrew Tridgell1-9/+11
everywhere. I've implemented slprintf() as a bounds checked sprintf() using mprotect() and a non-writeable page. This should prevent any sprintf based security holes. (This used to be commit ee09e9dadb69aaba5a751dd20ccc6d587d841bd6)
1998-05-08renamed last_change_time to pass_must_change_time. removed "if (bool==True)"Luke Leighton2-21/+20
and "if (bool==False)" code from ldap.c - a boolean test may not necessarily return exactly True or exactly False: True may be defined to be -1: you never know... (This used to be commit 9bf9752134a92b9a6e8895300d986cfa23547c03)
1998-05-07added first pass at start/get/end-ldappwent functions. unfortunately, lotsLuke Leighton1-10/+65
of information will be lost as these functions currently return struct smb_passwd not SAM_USER_INFO_21 or any other type of structure... (This used to be commit ad3097099cba524c9ec7c3ffc6d5647019efeaab)