summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/winbindd.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge of remove "winbindd holding pattern" from appliance. It's a bitTim Potter2003-01-131-6/+0
| | | | simpler as the rescanning of trusted domains helps us out a bit.
* patch to include support for daemontools from Michael HandlerGerald Carter2003-01-031-3/+21
|
* BIG patch...Andrew Bartlett2003-01-021-1/+1
| | | | | | | | | | | | | | | | This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett
* Forward port the change to talloc_init() to make all talloc contextsJeremy Allison2002-12-201-0/+20
| | | | | named. Ensure we can query them. Jeremy.
* Remove extra headers, and ensure that we correctly bail out of winbindd if weAndrew Bartlett2002-12-011-0/+6
| | | | | | can't create the socket. Andrew Bartlett
* After consultation with tpot, remove the 'winbind_domain' environmentAndrew Bartlett2002-11-261-1/+1
| | | | | | | | | | 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
* Having waited for *way* too long, this is mimir's namecache and trusted domainAndrew Bartlett2002-11-261-0/+1
| | | | | | | | | | | | cache code. This uses gencache, mimir's new caching code that stores at text-based cache of various data. Mimir has done a *lot* of work on this patch, and it is finally time to get it in CVS. Andrew Bartlett
* Bug fix from appliance - we must initialise the winbindd server stateTim Potter2002-11-181-2/+2
| | | | before reading smb.conf parameters, not after.
* Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison2002-11-121-12/+2
| | | | | | dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy.
* Compleatly remove support for logfile truncation. All logs are opened forAndrew Bartlett2002-11-081-6/+0
| | | | | | | | append writes. (blessed by jra) Andrew Bartlett
* Call winbindd_param_init() earlier on in the piece so we don't get stuck inTim Potter2002-11-071-14/+15
| | | | | | the holding pattern when started up when security = user or security = ads. Clean up return value of winbindd_common_init() - what a mess!
* Some winbindd cleanups I made trying to fix cr1020:Tim Potter2002-11-021-38/+22
| | | | | | | | | | | | - move winbindd client handling into accessor functions in winbindd_util.c - move some winbindd socket routines into accessor functions in winbindd_utils.c (The deadlock situation mentioned in the appliance branch is probably not applicable since we don't clear the connection cache on SIGHUP. Perhaps we should?)
* - we need to rescan the trusted domain list regularly to cope withAndrew Tridgell2002-10-151-0/+4
| | | | | | transitive trusts, and trusts that are added while winbindd is running - removed an unnecessary call to time()
* Change to use sys_read/sys_write.Jeremy Allison2002-10-151-10/+4
| | | | Jeremy.
* Reverted my earlier change. It was incorrect. We must be protected byJeremy Allison2002-09-171-5/+4
| | | | | pidfile before doing secrets_init(). Jeremy.
* Only create the pidfile once we're ready to receive requests.Jeremy Allison2002-09-171-3/+5
| | | | | This allows external programs to correctly synchronise with us. Jeremy.
* Put pid number in invalid request size debug.Tim Potter2002-09-111-2/+2
|
* Fix typo in debug.Tim Potter2002-08-271-1/+1
|
* Merge of netbios namecache code from APPLIANCE_HEAD.Tim Potter2002-08-161-0/+2
| | | | | | | Tridge suggested a generic caching mechanism for Samba to avoid the proliferation of little cache files hanging around limpet like in the locks directory. Someone should probably implement this at some stage.
* Winbind updates!Andrew Bartlett2002-07-311-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
* Another smattering of static and constAndrew Bartlett2002-07-211-1/+1
|
* this is a trick to work around the fact that posix does not supplyAndrew Tridgell2002-07-141-0/+1
| | | | | | | | | | a getgr*() function that lists groups without numerating all the group members. Instead of definiing a new nss method (which might cause problems) I added an environment variable WINBIND_GETGRLST that tells winbind not to fill in the group members in a gergrent() request. This can speed up group listing by a factor of 20 or more (on my test system with 50000 groups it reduces the time from an hour to 2 minutes)
* Merge pidfile fix.Jeremy Allison2002-06-071-3/+3
| | | | Jeremy.
* Merge of secrets_init() paranoia fix from 2.2Tim Potter2002-05-131-1/+6
|
* main() needs to be indented to make sure it doesn't generate aAndrew Tridgell2002-04-241-1/+1
| | | | prototype
* a new "dual daemon" operating mode for winbinddAndrew Tridgell2002-04-241-47/+88
| | | | | | | | | this mode improves the response time of winbindd by having a background process update the cache while the forground process responds to queries from cache. You can enable this mode using the -B command line option. It is quite experimental, which is why it is not the default.
* Tidy up winbindd debug. Added Bill Moran's hide unreadable fix.Jeremy Allison2002-04-131-4/+3
| | | | Jeremy.
* Fix up conversion code from old winbindd versions (some testing needed).Jeremy Allison2002-04-041-0/+4
| | | | | | Added time based cache size check (#ifdef'ed out by default, just didn't want to lose the code). Jeremy.
* merge winbindd WINS changes from 2.2Herb Lewis2002-03-291-0/+5
|
* Unblock sigusr1 on startup.Tim Potter2002-03-261-0/+1
|
* Added code for smb messaging. winbindd now responds to the smbcontrolTim Potter2002-03-261-2/+15
| | | | ping, debug and pool-usage messages.
* added a -h usage option to winbinddAndrew Tridgell2002-03-151-1/+16
|
* Now we have reliable signals take SIGTERM inband.Jeremy Allison2002-03-141-5/+4
| | | | Jeremy.
* fixed a memory leak thanks to dleducq@arkoon.netAndrew Tridgell2002-02-181-0/+1
|
* Fix from Michael Steffens <michael_steffens@hp.com> to make signalJeremy Allison2002-01-311-1/+4
| | | | | | processing work correctly in winbindd. This is a really good patch that gives full select semantics to the Samba modified select. Jeremy.
* added 'wbinfo --sequence' to show sequence numbers of all domainsAndrew Tridgell2002-01-311-0/+1
|
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Change the winbind interface to use seperate 'domain' and 'username' feilds forAndrew Bartlett2002-01-261-0/+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.
* Call pidfile_create() as part of init sequence.Tim Potter2002-01-221-0/+3
|
* Fix to close winbindd_idmap on exit. Pointed out by Alexander Bokovoy.Jeremy Allison2002-01-191-0/+2
| | | | Jeremy.
* I'm doing some things towards the NamedPipes game with lckl and he has asked meAndrew Bartlett2002-01-131-86/+2
| | | | | | | | | | to move this from being a static to matching its mate in lib/util_sock.c. In any case, this should discorage anybody from using the 'wrong' version of this function. (ie the one from TNG, which needs a bit more error checking depending on use). Andrew Bartlett
* Many thanks to Alexander Bokovoy <a.bokovoy@sam-solutions.net>.Andrew Bartlett2002-01-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This work was sponsored by Optifacio Software Services, Inc. Andrew Bartlett (various e-mails announcements merged into some form of commit message below:) This patch which adds basics of universal groups support into Samba 3. Currently, only Winbind with RPC calls supports this, ADS support requires additional (possibly huge) work on KRB5 PAC. However, basic infrastructure is here. This patch adds: 1. Storing of universal groups for particular user logged into Samba software (smbd/ two winbind-pam methods) into netlogon_unigrp.tdb as array of uint32 supplemental group rids keyed as DOMAIN_SID/USER_RID in tdb. 2. Fetching of unversal groups for given user rid and domain sid from netlogon_unigrp.tdb. Since this is used in both smbd and winbindd, main code is in source/lib/netlogon_uingrp.c. Dependencies are added to AUTH_OBJ as UNIGRP_OBJ and WINBINDD_OBJ as UNIGRP_OBJ. This patch has had a few versions, the final version in particular: Many thanks to Andrew Bartlett for critics and comments, and partly rewritten code. New: - updated fetching code to changed byte order macros - moved functions to proper namespace - optimized memory usage by reusing caller's memory context - enhanced code to more follow Samba coding rules Todo: - proper universal group expiration after timeout
* Always query the PDC for the list of trusted domains rather than interatingTim Potter2002-01-111-3/+3
| | | | | | | | | | | | | | | | | 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
* Since AB has been changing the winbind interface it's time to add the "mockTim Potter2002-01-101-16/+11
| | | | | | | | | | | swedish" test to client calls. This is putting a length field at the start of a request so we can disconnect clients talking with an out of date libnss_winbind.so rather than deadlock them. Misc cleanups: - made some int values uint32 - moved WINBIND_INTERFACE_VERSION to start of cmd list
* Return the winbind separator over the socket, so programs don't have to parseAndrew Bartlett2002-01-101-0/+2
| | | | | | | | | | | | | | | | smb.conf to get it right. While wb_client needs its lp_load() for samba dependency reasons, it now uses the new method both to example and test the new code. Also add an interface version function, and return the winbind's samba version string. In preperation for default domains, its now up to winbindd to reject plaintext auths that don't have a seperator, but NTLM (CRAP) auths now have two feilds, hence need parsing. Andrew Bartlett
* This changes the winbind protcol a bit:Andrew Bartlett2002-01-101-0/+1
| | | | | | | | | | | | | | It adds a 'ping' request, just to check winbind is in fact alive It also changes winbindd_pam_auth_crap to take usernames and domain seperatly. (backward incompatible change, needs merge to 2.2, but this is not yet released code, so no workarounds) Finally, it adds some debugs and fixes a few memory leaks (uses talloc to do it). Andrew Bartlett
* A big tidyup while thinking about getting trusted domains being re-readTim Potter2002-01-101-13/+14
| | | | | | | | | | | | | | | | | | 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
* When running interactive we want to set our own process group forJeremy Allison2001-12-301-0/+9
| | | | | signal management. Jeremy.
* Append to log.winbindd instead of overwriting it so we are consistent withTim Potter2001-12-211-0/+7
| | | | smbd/nmbd behaviour.
* Removed global debugf. Replaced with lp_set_logfile(name).Jeremy Allison2001-12-201-5/+13
| | | | | Fixed winbindd to finally stop leaving log. file droppings :-). Jeremy.