summaryrefslogtreecommitdiffstats
path: root/source/auth
Commit message (Collapse)AuthorAgeFilesLines
...
* added info level 3 to samrgetgroupinfo. I don't know what the value is.Jean-François Micouleau2001-12-101-1/+1
| | | | | | | | | | | | | It's just to keep usermanager happy ;-) clean up a bit samr_query_aliasinfo to return the group description added: samr_del_aliasmem, samr_del_groupmem and samr_del_domuser with the correct scripts, you can now entirely manage the users from usermanager ! Closer to full PDC every day ;-) J.F.
* Fix segfault, and add a comment.Andrew Bartlett2001-12-081-2/+5
|
* again an intrusive patch:Jean-François Micouleau2001-12-062-2/+4
| | | | | | | | | | | | | | | - removed the ugly as hell sam_logon_in_ssb variable, I changed a bit the definition of standard_sub_basic() to cope with that. - removed the smb.conf: 'domain admin group' and 'domain guest group' parameters ! We're not playing anymore with the user's group RIDs ! - in get_domain_user_groups(), if the user's gid is a group, put it first in the group RID list. I just have to write an HOWTO now ;-) J.F.
* I think the lookup_pdc_name() should be called lookup_dc_name() and theTim Potter2001-11-291-1/+1
| | | | | | | | name_status_find() call here should look up a #1c name instead of #1d. This fixes some bugs currently with BDC authentication in winbindd and in smbd as you can't query the #1d name with the ip address of a BDC. Who is Uncle Tom Cobbley anyway?
* fix a bunch of places where we can double-free a cli structureAndrew Tridgell2001-11-281-4/+0
|
* fixed the panics on basicsmb-sharelist on sun1Andrew Tridgell2001-11-271-1/+3
|
* fixed leak in free_user_info()Andrew Tridgell2001-11-271-0/+1
|
* another memory leak bites the dustAndrew Tridgell2001-11-271-4/+0
|
* fix sense of lp_allow_trusted_domains()Andrew Tridgell2001-11-273-11/+2
| | | | fix a memory leak
* Fix debugAndrew Bartlett2001-11-261-1/+1
|
* A number of things to clean up the auth subsytem a bit...Andrew Bartlett2001-11-266-52/+83
| | | | | | | | | | | | | | | | | | | | | | | We now default encrypt passwords = yes We now check plaintext passwords (however aquired) with the 'sam' backend rather than unix, if encrypt passwords = yes. (this kills off the 'local' backed. The sam backend may be renamed in its place) The new 'samstrict' wrapper backend checks that the user's domain is one of our netbios aliases - this ensures that we don't get fallback crazies with security = domain. Similarly, the code in the 'ntdomain' and 'smbserver' backends now checks that the user was not local before contacting the DC. The default ordering has changed, we now check the local stuff first - but becouse of the changes above, we will really only ever contact one auth source. Andrew Bartlett
* add SEC_ADS auth methodAndrew Tridgell2001-11-261-0/+12
|
* challange -> challengeTim Potter2001-11-267-54/+54
|
* Got medieval on another pointless extern. Removed extern struct ipzeroTim Potter2001-11-261-5/+3
| | | | | | | and replaced with two functions: void zero_ip(struct in_adder *ip); BOOL is_zero_ip(struct in_addr ip);
* This compleats the of the authenticaion subystem into the new 'auth'Andrew Bartlett2001-11-261-1/+410
| | | | | | | | | | | | subdirectory. (The insertion of these files was done with some CVS backend magic, hence the lack of a commit message). This also moves libsmb/domain_client_validate.c back into auth_domain.c, becouse we no longer share it with winbind. Andrew Bartlett
* Add the PDC end of the smbtorture test for creating an NT_STATUS -> DOS errorAndrew Bartlett2001-11-252-0/+36
| | | | | | | | | | | | | | | | map. This little authentication module is #ifdef DEVELOPER, becouse it really is of no use execept as a development tool invoke by setting: auth methods = guest sam name_to_ntstatus in the smb.conf file (the SAM and guest elements are required for the member server to authenticate itself). Andrew Bartlett
* And add the winbind module I missed in the last run.Andrew Bartlett2001-11-241-0/+111
| | | | | | (large change to modularise the auth subsystem) Andrew Bartlett
* This is another rather major change to the samba authenticaionAndrew Bartlett2001-11-249-292/+799
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subystem. The particular aim is to modularized the interface - so that we can have arbitrary password back-ends. This code adds one such back-end, a 'winbind' module to authenticate against the winbind_auth_crap functionality. While fully-functional this code is mainly useful as a demonstration, because we don't get back the info3 as we would for direct ntdomain authentication. This commit introduced the new 'auth methods' parameter, in the spirit of the 'auth order' discussed on the lists. It is renamed because not all the methods may be consulted, even if previous methods fail - they may not have a suitable challenge for example. Also, we have a 'local' authentication method, for old-style 'unix if plaintext, sam if encrypted' authentication and a 'guest' module to handle guest logins in a single place. While this current design is not ideal, I feel that it does provide a better infrastructure than the current design, and can be built upon. The following parameters have changed: - use rhosts = This has been replaced by the 'rhosts' authentication method, and can be specified like 'auth methods = guest rhosts' - hosts equiv = This needs both this parameter and an 'auth methods' entry to be effective. (auth methods = guest hostsequiv ....) - plaintext to smbpasswd = This is replaced by specifying 'sam' rather than 'local' in the auth methods. The security = parameter is unchanged, and now provides defaults for the 'auth methods' parameter. The available auth methods are: guest rhosts hostsequiv sam (passdb direct hash access) unix (PAM, crypt() etc) local (the combination of the above, based on encryption) smbserver (old security=server) ntdomain (old security=domain) winbind (use winbind to cache DC connections) Assistance in testing, or the production of new and interesting authentication modules is always appreciated. Andrew Bartlett
* More spelling fixes, comment reformatting.Tim Potter2001-11-211-8/+11
|
* Spelling fix, reformatted comment.Tim Potter2001-11-211-4/+6
|
* Fixed sizeof vs array length bug in make_user_info_winbind_crap()Tim Potter2001-11-201-2/+2
| | | | Spelling fix.
* Fix up some DEBUG()sAndrew Bartlett2001-11-111-17/+37
| | | | | | Add and fix comments Add 'const' to some more input paramaters.
* Add back the not null checks in a better place.Andrew Bartlett2001-11-111-1/+7
| | | | Check the pdb_init_sam() for failure.
* make sam_account_ok static.Andrew Bartlett2001-11-111-32/+29
| | | | | | remove rudundent not null checks fix indenting
* This extra check isn't needed, we can only get here if secuirty=domainAndrew Bartlett2001-11-111-3/+0
|
* Minor updates. A small dose of const.Andrew Bartlett2001-11-112-2/+2
|
* 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
* This change updates lp_guestaccount() to be a *global* paramater, rather thanAndrew Bartlett2001-11-091-1/+1
| | | | | | | | | | | | | | | | per-share. I beleive that almost all the things that this could have done on a per-share basis can be done with other tools, like 'force user'. Almost all the user's of this paramater used it as a global anyway... While this is one step at a time, I hope it will allow me to considerably simplfy the make_connection() code, particularly for the user-level security case. This already removes an absolute truckload of extra attempted password lookups on the guest account. Andrew Bartlett
* Change to guest logon code.Andrew Bartlett2001-11-082-26/+94
| | | | | | | | | | | | | | | | | | | | | | | | | This changes the way we process guest logons - we now treat them as normal logons, but set the 'guest' flag. In particular this is needed becouse Win2k will do an NTLMSSP login with username "", therefore missing our previous guest connection code - this is getting a pain to do as a special case all over the shop. Tridge: We don't seem to be setting a guest bit for NTLMSSP, in either the anonymous or authenticated case, can you take a look at this? Also some cleanups in the check_password() code that should make some of the debugs clearer. Various other minor cleanups: - change the session code to just take a vuser, rather than having to do a vuid lookup on vuser.vuid - Change some of the global_client_caps linking - Better debug in authorise_login(): show the vuid. Andrew Bartlett
* Renamed make_user_info_for_winbindd() to be more consistent with theTim Potter2001-11-051-4/+4
| | | | names of the other functions in this file.
* Added NT_USER_TOKEN into server_info to fix extra groups problem.Jeremy Allison2001-11-031-12/+58
| | | | | Got "medieval on our ass" about const warnings (as many as I could :-). Jeremy.
* Minor cleanups/fixes in the NTLMv2 codeAndrew Bartlett2001-11-031-6/+2
|
* Various post AuthRewrite cleanups, fixups and tidyups.Andrew Bartlett2001-11-012-22/+31
| | | | | | | | | | | | | | | | | Zero out some of the plaintext passwords for paranoia Fix up some of the other passdb backends with the change to *uid_t rather than uid_t. Make some of the code in srv_netlog_nt.c clearer, is passing an array around, so pass its lenght in is definition, not as a seperate paramater. Use sizeof() rather than magic numbers, it makes things easier to read. Cope with a PAM authenticated user who is not in /etc/passwd - currently by saying NO_SUCH_USER, but this can change in future. Andrew Bartlett
* Fix up domain logons. Tested with NT4.Andrew Bartlett2001-10-311-1/+1
|
* This is a farily large patch (3300 lines) and reworks most of the AuthRewriteAndrew Bartlett2001-10-317-273/+868
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | code. In particular this assists tpot in some of his work, becouse it provides the connection between the authenticaion and the vuid generation. Major Changes: - Fully malloc'ed structures. - Massive rework of the code so that all structures are made and destroyed using malloc and free, rather than hanging around on the stack. - SAM_ACCOUNT unix uids and gids are now pointers to the same, to allow them to be declared 'invalid' without the chance that people might get ROOT by default. - kill off some of the "DOMAIN\user" lookups. These can be readded at a more appropriate place (probably domain_client_validate.c) in the future. They don't belong in session setups. - Massive introduction of DATA_BLOB structures, particularly for passwords. - Use NTLMSSP flags to tell the backend what its getting, rather than magic lenghths. - Fix winbind back up again, but tpot is redoing this soon anyway. - Abstract much of the work in srv_netlog_nt back into auth helper functions. This is a LARGE change, and any assistance is testing it is appriciated. Domain logons are still broken (as far as I can tell) but other functionality seems intact. Needs testing with a wide variety of MS clients. Andrew Bartlett
* Small 'const' updates ahead of some AuthRewrite merging.Andrew Bartlett2001-10-311-5/+5
|
* Added some extra fields to the auth_serversupplied_info structure.Tim Potter2001-10-311-1/+13
| | | | | | | | | To obtain the full group membership of a user (i.e nested groups on a win2k native mode server) it is necessary to merge this list of groups with the groups returned by winbindd when creating an nt access token. This breaks winbindd linking while AB and I sync up our changes to the authentication subsystem.
* Spnego on the 'server' end of security=server just does not work, so set theAndrew Bartlett2001-10-301-0/+3
| | | | | | | | | flags so we just do a 'normal' session setup. Also add some parinoia code to detect when sombody attempts to do a 'normal' session setup when spnego had been negoitiated. Andrew Bartlett
* Fix up auth_smbpasswd.c to use the password interface, rather than theAndrew Bartlett2001-10-291-8/+8
| | | | | | structures directly. Andrew Bartlett
* This commit is number 4 of 4.Andrew Bartlett2001-10-292-16/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular this commit focuses on: Actually adding the 'const' to the passdb interface, and the flow-on changes. Also kill off the 'disp_info' stuff, as its no longer used. While these changes have been mildly tested, and are pretty small, any assistance in this is appreciated. ---- These changes introduces a large dose of 'const' to the Samba tree. There are a number of good reasons to do this: - I want to allow the SAM_ACCOUNT structure to move from wasteful pstrings and fstrings to allocated strings. We can't do that if people are modifying these outputs, as they may well make assumptions about getting pstrings and fstrings - I want --with-pam_smbpass to compile with a slightly sane volume of warnings, currently its pretty bad, even in 2.2 where is compiles at all. - Tridge assures me that he no longer opposes 'const religion' based on the ability to #define const the problem away. - Changed Get_Pwnam(x,y) into two variants (so that the const parameter can work correctly): - Get_Pwnam(const x) and Get_Pwnam_Modify(x). - Reworked smbd/chgpasswd.c to work with these mods, passing around a 'struct passwd' rather than the modified username --- This finishes this line of commits off, your tree should now compile again :-) Andrew Bartlett
* This commit is number 3 of 4.Andrew Bartlett2001-10-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular this commit focuses on: Changing the Get_Pwnam code so that it can work in a const-enforced environment. While these changes have been mildly tested, and are pretty small, any assistance in this is appreciated. ---- These changes allow for 'const' in the Samba tree. There are a number of good reasons to do this: - I want to allow the SAM_ACCOUNT structure to move from wasteful pstrings and fstrings to allocated strings. We can't do that if people are modifying these outputs, as they may well make assumptions about getting pstrings and fstrings - I want --with-pam_smbpass to compile with a slightly sane volume of warnings, currently its pretty bad, even in 2.2 where is compiles at all. - Tridge assures me that he no longer opposes 'const religion' based on the ability to #define const the problem away. - Changed Get_Pwnam(x,y) into two variants (so that the const parameter can work correctly): - Get_Pwnam(const x) and Get_Pwnam_Modify(x). - Reworked smbd/chgpasswd.c to work with these mods, passing around a 'struct passwd' rather than the modified username
* more compiler warningsHerb Lewis2001-10-232-2/+2
|
* print in a human readable format when the password expired.Jean-François Micouleau2001-10-191-1/+1
| | | | J.F.
* 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.
* Fix up indenting in out SAM password check code.Andrew Bartlett2001-10-061-46/+49
|
* Fixed up the change password bug when not using PAM.Jeremy Allison2001-10-021-2/+2
| | | | | | | | | | | | The problem is we were trying to use mask_match as a generic wildcard matcher for UNIX strings (like the password prompts). We can't do that - we need a unix_wild_match (re-added into lib/util.c) as the ms_fnmatch semantics for empty strings are completely wrong. This caused partial reads to be accepted as correct passwd change responses when they were not.... Also added paranioa test to stop passwd change being done as root with no %u in the passwd program string. Jeremy.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-029-33/+1
|
* honor the ACB_PWNOEXP flag in smbpasswdAndrew Tridgell2001-10-011-2/+1
|
* - fix handling of 0 last_change_time and must_change_timeAndrew Tridgell2001-10-011-31/+32
| | | | - move the arbitrary 21 day timeout to local.h
* Fix up a number of intertwined issues:Andrew Bartlett2001-09-293-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The big one is a global change to allow us to NULLify the free'ed pointer to a former passdb object. This was done to allow idra's SAFE_FREE() macro to do its magic, and to satisfy the input test in pdb_init_sam() for a NULL pointer to start with. This NULL pointer test was what was breaking the adding of accounts up until now, and this code has been reworked to avoid duplicating work - I hope this will avoid a similar mess-up in future. Finally, I fixed a few nasty bugs where the pdb_ fuctions's return codes were being ignored. Some of these functions malloc() and are permitted to fail. Also, this caught a nasty bug where pdb_set_lanman_password(sam, NULL) acheived precisely didilly-squat, just returning False. Now that we check the returns this bug was spotted. This could allow different LM and NT passwords. - the pdbedit code needs to start checking these too, but I havn't had a chance to fix it. I have also fixed up where some of the password changing code was using the pdb_set functions to store *internal* data. I assume this is from a previous lot of mass conversion work... Most likally (and going on past experience) I have missed somthing, probably in the LanMan password change code which I havn't yet been able to test, but this lot is in much better shape than it was before. If all this is too much to swallow (particularly for 2.2.2) then just adding a sam_pass = NULL to the particular line of passdb.c should do the trick for the ovbious bug. Andrew Bartlett