summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_user.c
AgeCommit message (Collapse)AuthorFilesLines
2003-02-12setup the %U substitution in winbindd for the homedir templateAndrew Tridgell1-0/+1
(This used to be commit 6186c10ceb2e61cd684968b56d3f32d9916538f8)
2002-12-20Forward port the change to talloc_init() to make all talloc contextsJeremy Allison1-4/+4
named. Ensure we can query them. Jeremy. (This used to be commit 842e08e52a665ae678eea239759bb2de1a0d7b33)
2002-11-26After consultation with tpot, remove the 'winbind_domain' environmentAndrew Bartlett1-17/+0
variable hack, the feild on the pipe, and the server-side. It only controlled some enum operations in any case. This is to try and have less 'magic' environment variables. Andrew Bartlett (This used to be commit e4be82e4e2c7cdf15f3e20f73fe9f281f6384423)
2002-07-31Winbind updates!Andrew Bartlett1-0/+3
This updates the 'winbind' authentication module and winbind's 'PAM' (actually netlogon) code to allow smbd to cache connections to the DC. This is particulary relevent when we need mutex locks already - there is no parallelism to be gained anyway. The winbind code authenticates the user, and if successful, passes back the 'info3' struct describing the user. smbd then interprets that in exactly the same way as an 'ntdomain' logon. Also, add parinoia to winbind about null termination. Andrew Bartlett (This used to be commit 167f122b670d4ef67d78e6f79a2bae3f6e8d67df)
2002-06-18more debug classess activatedSimo Sorce1-0/+3
(This used to be commit 897e64d2e0c1d04ab93441ccaffe369bf43be46e)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-26Change the winbind interface to use seperate 'domain' and 'username' feilds forAndrew Bartlett1-1/+1
the sid->uid and uid->sid conversions. Remove some duplicate arguments from these funcitons, and update the request/response structures for this and the 'winbind domain name' feature. As such 'winbindd_lookup_name' now takes both a domain and username. (This used to be commit ce1b4d4c309e4a60bec5a53224585bd504264672)
2002-01-20This patch makes the 'winbind use default domain' code interact better withAndrew Bartlett1-37/+26
smbd, and also makes it much cleaner inside winbindd. It is mostly my code, with a few changes and testing performed by Alexander Bokovoy <a.bokovoy@sam-solutions.net>. ab has tested it in security=domain and security=ads, but more testing is always appricatiated. The idea is that we no longer cart around a 'domain\user' string, we keep them seperate until the last moment - when we push that string into a pwent on onto the socket. This removes the need to be constantly parsing that string - the domain prefix is almost always already provided, (only a couple of functions actually changed arguments in all this). Some consequential changes to the RPC client code, to stop it concatonating the two strings (it now passes them both back as params). I havn't changed the cache code, however the usernames will no longer have a double domain prefix in the key string. The actual structures are unchanged - but the meaning of 'username' in the 'rid' will have changed. (The cache is invalidated at startup, so on-disk formats are not an issue here). Andrew Bartlett (This used to be commit e870f0e727952aeb8599cf93ad2650ae56eca033)
2002-01-18This is the 'winbind default domain' patch from Alexander BokovoyAndrew Bartlett1-6/+4
<a.bokovoy@sam-solutions.net>. The idea is the domain\username is rather harsh for unix systems - people don't expect to have to FTP, SSH and (in particular) e-mail with a username like that. This 'corrects' that - but is not without its own problems. As you can see from the changes to files like username.c and wb_client.c (smbd's winbind client code) a lot of assumptions are made in a lot of places about lp_winbind_seperator determining a users's status as a domain or local user. The main change I will shortly be making is to investigate and kill off winbind_initgroups() - as far as I know it was a workaround for an old bug in winbind itself (and a bug in RH 5.2) and should no longer be relevent. I am also going to move to using the 'winbind uid' and 'winbind gid' paramaters to determine a user/groups's 'local' status, rather than the presence of the seperator. As such, this functionality is recommended for servers providing unix services, but is currently less than optimal for windows clients. (TODO: remove all references to lp_winbind_seperator() and lp_winbind_use_default_domain() from smbd) Andrew Bartlett (This used to be commit 07a21fcd2311d2d9b430b99303e3532a8c1159e4)
2002-01-11Always query the PDC for the list of trusted domains rather than interatingTim Potter1-15/+17
the list received at startup or we get an out of date list. I thought there might be some sequence number that is incremented when a trusted domain is added or removed - perhaps there is but I just haven't found it yet. - Renamed get_domain_info() to init_domain_list() - Made an accessor function to return the list of trusted domains rather than using a global so we don't have to remember to put a magic init function - The getent state can not keep a pointer to a winbind_domain structure as it may be freed if init_domain_list() is called again so we keep the domain name instead (This used to be commit 37216c649a394b449eaaaa6644709eafb3bf37ff)
2002-01-10A big tidyup while thinking about getting trusted domains being re-readTim Potter1-23/+34
when they are added or removed on the PDC. - renamed GETPWNAM_FROM_{UID,USER} constants and functions to GETPW{NAM,UID} - renamed GETGRNAM_FROM_{GID,GROUP} constants and functions to GETGR{NAM,GID} - use SIGUSR2 in winbindd for debugging/logging instead of SIGUSR1 in preparation for moving to smbcontrol type messages (not sure whether to ditch this altogether or not) - tidy debugging messages in top level winbind user and group routines - convert talloc_init() to talloc_init_named() - make enumerations of the domain list use the same local variable names (This used to be commit eeb8af9c1a66bfcd80823d7b406acbab79857a16)
2001-12-11got rid of start_ndx from query_user_list()Andrew Tridgell1-89/+72
(This used to be commit 1c909afe76566807fb576c965eb869f98e72f2bd)
2001-12-10added some commentsAndrew Tridgell1-2/+1
(This used to be commit 5ab2c8b8214236b4cd028f791e9ddb76a9973d74)
2001-12-09completely new winbindd cache infrastructureAndrew Tridgell1-58/+0
this one looks like just another winbind backend, and has the following properties: - does -ve and +ve cacheing of all queries - can be disabled with -n switch to winbindd - stores all records packed, so even huge domains are not a problem for a complete cache - handles the server being down - uses sequence numbers for all entries This fixes a lot of problems with winbindd. Serving from cache is now *very* fast. (This used to be commit fddb4f4c04473a60a97212c0c8e143d6a4d68380)
2001-12-05finally worked out how to do ldap lookups by binary blobs, so I canAndrew Tridgell1-4/+2
now do searches on SID. This allows me to do a true ldap sid_to_name() function one one function to go! (This used to be commit 7d44aa3915bc88fd2b2f8454f190b11677cbb848)
2001-12-05Fixed parse_domain_user to be bool.Jeremy Allison1-8/+6
Jeremy. (This used to be commit 9563de2ef8c1197f4941671d2fdade7d933c32d0)
2001-12-04added a query_user backendAndrew Tridgell1-31/+27
fixed a winbindd crash when the group membership can't be looked up (This used to be commit 088f4cc5be4a1a38781e4d019146d53993ed8c6f)
2001-12-03changed query_dispinfo to query_user_listAndrew Tridgell1-5/+5
(This used to be commit 80010d80f93cfb32c53a1720c7564fb080846f35)
2001-12-03added name_to_sid to the backendAndrew Tridgell1-1/+1
(This used to be commit 816e40a51af80a7f703c0451304de406deab3dd8)
2001-12-01The beginnings of alternative backends for winbinddAndrew Tridgell1-52/+31
This just splits off the dispinfo call behind a methods structure. I'll split off a few more functions soon, then we will be ready for LDAP replacement methods (This used to be commit 0216b0fca115c903ec31ed21427a83c62077dc95)
2001-11-27Added negative caching to group lookups.Jeremy Allison1-3/+3
Jeremy. (This used to be commit fceba7dea5b09ac9ce509c5252a46be8e4d3de85)
2001-11-27Added negative caching to the user pw lookup by name and by uid.Jeremy Allison1-56/+77
Jeremy. (This used to be commit 4013ae87a1c73ceba346de2a0b905e7c8df355c4)
2001-11-27nsswitch/winbindd_group.c nsswitch/winbindd_user.c: formatting fixups.Jeremy Allison1-23/+24
smbd/open.c: Fix "delete on close" for directories. Jeremy. (This used to be commit 014b0973a3b3b9eb22cce3053171fa55f5c16a63)
2001-11-21Added transparent +ve caching for lookupname/lookupsid. -ve caching canJeremy Allison1-6/+6
be easily added (a one liner) once we know the correct error codes returned by a W2K DC. All other winbindd calls should go through a similar transparent caching layer (and will soon). Jeremy. (This used to be commit b16bb21d371772816a4331f5011c151be0e083d5)
2001-11-15Get list of trusted domains if we haven't fetched them yet.Tim Potter1-0/+6
(This used to be commit 187663210055ecd7b717b3894e3189ca3aaa0ed2)
2001-10-29Hey where did those 4 character tabs come from?Tim Potter1-4/+4
(This used to be commit 49d47238267c3a2e0fc466178b779a692a7809ff)
2001-10-29Don't reference tallocated memory that has already been disposed of. TheTim Potter1-3/+22
cli_samr_query_userinfo function used to do this. (This used to be commit da2c167660ec12360354f96dc672d935f58dd9c0)
2001-10-19Fixed some memory leaks introduced by connection handling rewrite, as wellTim Potter1-7/+16
as one memory leak that has been there for ages! Changed the way talloc is used in get{pw,gr}nam routines. (This used to be commit d52cd1854fdff18c223d6dd1eca0e26f1f0bf01b)
2001-10-19Converted some more functions to create and dispose of a talloc context on aTim Potter1-26/+30
per-call basis rather than per-connection. Had a bit more of a reformatting fest. Still need to run it through insure and handle downed connections. (This used to be commit 46fe5a8fb96974e1323bc3e5d94fda74edbeb852)
2001-10-14Pass domain structure around in cache code rather than the domain name.Tim Potter1-6/+6
(This used to be commit c6338d7eaeb31db2666603fcdd9179e61891a1c9)
2001-10-09Implemented sam group handle stuff. getent group now works.Tim Potter1-5/+9
(This used to be commit 63731d4a00e7a70b48d0c25677c76ec6b2e04ce1)
2001-10-08More work on winbindd connection rewrite:Tim Potter1-94/+55
- implemented some of the sam related connection manager routines - fill in group id and gecos fields for getpwnam/getpwuid routines - convert querydispinfo to cm - getent passwd now works Now for the group related routines... (This used to be commit 4f8ea877876e91d4762f22e78aeb1bce4c65f011)
2001-10-05This is the start of a bit of a rewrite of winbindd's connection handling.Tim Potter1-18/+18
I've wrapped up all the decisions about managing, making and closing connections into a connection manager in nsswitch/winbindd_cm.c. It's rather incomplete at the moment - only querying basic user info works at the moment (i.e finger -m DOMAIN/user) and everything else is broken. Jeremy, please take a look and I'll start moving across the rest of winbindd to this new system. (This used to be commit c369cf5af787ed9c642778d21f162716fbf0620e)
2001-09-17move to SAFE_FREE()Simo Sorce1-12/+7
(This used to be commit 03dc67788f68c9e01b5a82fdf43f837cb19f4608)
2001-09-05fixed a bunch of compilation errors on Solaris, mostly people getting ↵Andrew Tridgell1-1/+2
NSS_STATUS and WINBINDD error codes mixed up (This used to be commit 66698d6b841df809a8654012a8385bffacb9dc4a)
2001-09-04the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but ↵Andrew Tridgell1-5/+7
the client code still needs some work (This used to be commit dcd6e735f709a9231860ceb9682db40ff26c9a66)
2001-08-27converted another bunch of stuff to NTSTATUSAndrew Tridgell1-2/+2
(This used to be commit 1d36250e338ae0ff9fbbf86019809205dd97d05e)
2001-08-18More Realloc fixes.Jeremy Allison1-7/+17
Jeremy. (This used to be commit 381c02e6389dbb41fa66a854d7293594fd4bd0a6)
2001-08-12this is a big global fix for the ptr = Realloc(ptr, size) bug.Simo Sorce1-3/+6
many possible mem leaks, and segfaults fixed. someone should port this fix to 2.2 also. (This used to be commit fa8e55b8b465114ce209344965c1ca0333b84db9)
2001-05-14Compile fixes for dynamic samr_query_userinfo() stuff.Tim Potter1-12/+6
(This used to be commit a92a0d061bd322b9d3a1fe13c6ce2d2e1f070ef7)
2001-05-09Fixes from nsswitch testsuite. Lots of stuff works much better now. (-:Tim Potter1-0/+2
(This used to be commit 014859b62b31ceff5b5ca3d1699792e362c77a85)
2001-05-08The substitution of %U and %D in the 'template homedir' is nowdoneTim Potter1-10/+6
by lp_string() calling standard_sub_basic(). (This used to be commit 011d45943594a7a4091101b1eec930d13f0a9d12)
2001-05-07OK so I couldn't be as clever as I wanted to be with winbindd_glue.cTim Potter1-2/+2
so all the glue functions are prefixed with wb_ to avoid conflicts with the old rpc_client stuff which is still a dependency of smbd/nmbd. (This used to be commit 873e672b90e85e092102e10966e9f93f4fa6814f)
2001-05-07Preliminary merge of winbind into HEAD. Note that this compiles and linksTim Potter1-283/+562
but I haven't actually run it yet so it probably doesn't work. (-: (This used to be commit 59f95416b66db6df05289bde224de29c721978e5)
2001-04-08Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 94747b4639ed9b19f7d0fb896e43aa392a84989a)
2000-05-12use "winbind separator" in tng as wellAndrew Tridgell1-2/+4
(This used to be commit 0189af544244d7d20e4042cd1238f370968cb7a9)
2000-05-09brought the winbindd code into headAndrew Tridgell1-0/+412
this does not yet compile, but I'm working on that. (This used to be commit 3fb862531a4e78dca13d16d958517b16e5bdd4e2)