summaryrefslogtreecommitdiffstats
path: root/source/auth/pass_check.c
Commit message (Collapse)AuthorAgeFilesLines
* Some cleanups:Andrew Bartlett2003-02-101-1/+1
| | | | | | | | | | | | | | | - Don't use pstrcpy into an allocated string - use safe_strcpy() directly instead. - Keep a copy of the 'server_info' attached to the vuid. In future use this for things like the session key, homedir and full name instead of current copies. - Try to avoid memory leak/segfault on Realloc failure - clear up #endif comments Andrew Bartlett
* Second stab at Volker's 'make shadow passwords work' patch.Andrew Bartlett2002-09-281-4/+4
| | | | | | | | | | | | | | | | | | | Basicly, the password and the salt must be taken from the same place in both passwd and shadow based systems. Taking salt from one, and password from the other just doesn't work. So pull them from passwd, then overwrite them if need be. When modifying this file, watch the #ifdef hell - as vl found out, some variables are globals - but only with #ifndef WITH_PAM, and the code jumps all over the place with the password cracker. Getting double-reviews of any change to this file highly advised, it is one of our most system-specifc areas of code. (So now I get to take the blame for this one... :-) Andrew Bartlett
* Back our volker's patch as was breaking the build.Andrew Bartlett2002-09-271-7/+2
| | | | | | | | | Volker, I would like to understand what you are trying to do here... I'll trust that it's broken (this code is certainly not well tested) but I do want to keep a close eye on the fixes... Andrew Bartlett
* Sorry to touch such an internal function. But I was quite surprised thatVolker Lendecke2002-09-271-2/+7
| | | | | | | | | | | | 'security = user', 'encrypt passwords = no' did not work anymore. This is on quite a standard SuSE 7.3, ./configure.developer --with-tdbsam. I can provide a config.log / config.h on demand. Please re-check for consequences, I don't really oversee that file. Thanks, Volker
* Cleanups!Andrew Bartlett2002-05-221-37/+25
| | | | | | | | | | Make some code static, add some const to the PAM code, and make the plaintext password code actually function - particulary without the requirement to modify the 'struct passwd' (which it assumed was made up of fstrings) This kills some particularly ugly code in lib/util_pw.c Andrew Bartlett
* typo, sorrySimo Sorce2002-05-211-1/+1
|
* debug classizedSimo Sorce2002-05-211-0/+3
|
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* A nice *big* change to the fundemental way we do things.Andrew Bartlett2002-01-171-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Samba (ab)uses the returns from getpwnam() a lot - in particular it keeps them around for a long time - often past the next call... This adds a getpwnam_alloc and a getpwuid_alloc to the collection. These function as expected, returning a malloced structure that can be free()ed with passwd_free(&passwd). This patch also cuts down on the number of calls to getpwnam - mostly by taking advantage of the fact that the passdb interface is already case-insensiteve. With this patch most of the recursive cases have been removed (that I know of) and the problems are reduced further by not using the sys_ interface in the new code. This means that pointers to the cache won't be affected. (This is a tempoary HACK, I intend to kill the password cache entirly). The only change I'm a little worried about is the change to rpc_server/srv_samr_nt.c for private groups. In this case we are getting groups from the new group mapping DB. Do we still need to check for private groups? I've toned down the check to a case sensitve match with the new code, but we might be able to kill it entirly. I've also added a make_modifyable_passwd() function, that copies a passwd struct into the form that the old sys_getpw* code provided. As far as I can tell this is only actually used in the pass_check.c crazies, where I moved the final 'special case' for shadow passwords (out of _Get_Pwnam()). The matching case for getpwent() is dealt with already, in lib/util_getent.c Also included in here is a small change to register the [homes] share at vuid creation rather than just in one varient of the session setup. (This picks up the SPNEGO cases). The home directory is now stored on the vuid, and I am hoping this might provide a saner way to do %H substitions. TODO: Kill off remaining Get_Pwnam_Modify calls (they are not needed), change the remaining sys_getpwnam() callers to use getpwnam_alloc() and move Get_Pwnam to return an allocated struct. Andrew Bartlett
* Remove built-in support for clear-text kerberos authentication.Andrew Bartlett2001-11-111-123/+3
| | | | | | | | | | This should remove some confusion from the ./configure, but does not affect the 'real' kerberos support currently residing in smbd/sesssetup.c. This code is vunerable to a spoofed KDC, and is best replaced by --with-pam and the pam_krb5 module. This module includes measures to prevent such spoofing. Andrew Bartlett
* Merge the become_XXX -> change_to_XXX fixes from 2.2.2 to HEAD.Jeremy Allison2001-10-181-1/+1
| | | | | Ensure make_conection() can only be called as root. Jeremy.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-5/+0
|
* Move pass_check.c over to NTSTATUS, allowing full NTSTATUS from PAM to wire!Andrew Bartlett2001-09-201-80/+118
| | | | | Add the ability for swat to run in non-root-mode (ie non-root from inetd). - we still need some of the am_root() calls fixed however.
* Remove the ugly hacks to get around the Get_Pwnam() calls in pass_check.c byAndrew Bartlett2001-09-191-5/+6
| | | | | | | | | | | | | simply not doing Get_Pwnam() calls in pass_check.c We now make *one* sys_getpnam() call in cgi.c and we always call PAM no matter what it returns. We also no longer run the password cracker for these logins. The truly parinod will note the slight difference in call paths, in that we only call crypt for valid password structs (if not --with-pam). The truly parinoid don't run SWAT either, so I don't think this is an issue. Andrew Bartlett
* the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but ↵Andrew Tridgell2001-09-041-1/+1
| | | | the client code still needs some work
* Fixed silly typo.Jeremy Allison2001-08-301-3/+3
| | | | Jeremy.
* Fix from Paul Green to set correct lengths.Jeremy Allison2001-08-301-3/+3
| | | | Jeremy.
* converted another bunch of stuff to NTSTATUSAndrew Tridgell2001-08-271-1/+1
|
* This removes unused paramaters from various authtication functions, and shouldAndrew Bartlett2001-07-081-7/+2
| | | | | | | | | not change behaviour. This should make my later diffs smaller, where I actualy start cleaning up this mess... Andrew Bartlett
* Added Andrew Bartlett's fixes to my changes to his original patch (at theJeremy Allison2001-05-011-1/+1
| | | | | court of king caractacus, was just passing by... :-). Jeremy.
* Added smb_ prefix to all Samba wrapper pam functions.Jeremy Allison2001-04-231-1/+1
| | | | | Fixed off by one bug using StrnCpy instead of strdup(). Jeremy.
* Commit of a modified version of Andrew Bartlett's patch that removes theJeremy Allison2001-04-221-2/+17
| | | | | | | | | | horrid utmp hostname parameter - now uses the client name instead. Also tidies up some of the unencrypted password checking when PAM is compiled in. FIXME ! An pam_accountcheck() is being called even when smb encrypted passwords are negotiated. Is this the correct thing to do when winbindd is running ! This needs *SEVERE* testing.... Jeremy.
* passdb/pass_check.c: Ensure second check is done only if given username is ↵Jeremy Allison2001-04-101-62/+26
| | | | | | | all in caps. rpc_server/srv_srvsvc_nt.c: Added "CONFIGFILE" arg to scripts so path to smb.conf is given. Jeremy.
* Added JohnT and Andrew Bartlett's PAM changes.Jeremy Allison2001-04-101-134/+4
| | | | Jeremy.
* add pam_setcred() call to pam_auth(). Patch was submited last Oct.Gerald Carter2001-02-081-0/+8
| | | | jerry
* Getting back to a compilable state (not there yet but close).Jeremy Allison2000-06-011-14/+2
| | | | | | | Added patches for random -> sys_random. Added set_effective_xxx patches for AFS code. Memory allocation changes in spoolss code. Jeremy.
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-021-3/+3
| | | | | of doing a system call every time we want to just get our pid. Jeremy.
* indent update to make t easier to see setuid mods in TNG. someLuke Leighton2000-03-211-366/+459
| | | | code from these modules i had to leave out (nothing to do withj setuid)
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-54/+129
|
* Moved code that changes the pw_passwd entry (i.e shadow password andTim Potter1999-06-131-63/+1
| | | | | | | | weird unixware stuff) into _Get_Pwnam() to fix a memory allocation bug. Note that the Get_Pwnam() function now returns a const struct passwd * as a hint to other developers not to change entries in the struct passwd.
* pass_check.c could receive encrypted password: printing it out as a %sLuke Leighton1999-03-081-1/+2
| | | | | results in garbage. with no password length argument doing dump_data( 100, password, strlen(password)) is the next best alternative.
* Added Kerberos4 support patches from Johan Hedin <johanh@fusion.kth.se>Jeremy Allison1998-09-261-1/+3
| | | | Jeremy.
* some cleanups to use ZERO_STRUCT() and friendsAndrew Tridgell1998-09-051-1/+1
|
* got rid of calls to update_protected_database(). It was causing coreAndrew Tridgell1998-08-291-37/+0
| | | | | dumps. It is gone until someone can tell us why its needed and what it does. (It was only used on OSF1 and core dumped there anyway!)
* use user instead of this_user to prevent global shadowingAndrew Tridgell1998-08-151-18/+18
|
* split the system password checking routines out of smbd/password.c andAndrew Tridgell1998-08-101-0/+950
into passdb/pass_check.c. This means SWAT no longer needs to link to smbd/password.c