summaryrefslogtreecommitdiffstats
path: root/source/smbd/server.c
Commit message (Collapse)AuthorAgeFilesLines
* Removed version number from file header.Tim Potter2002-01-301-1/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* merge from 2.2Gerald Carter2002-01-301-1/+8
|
* Since we have dynamic initialisation in the group mapping code, makeTim Potter2002-01-291-5/+0
| | | | | | | init_group_mapping() a static function and don't call it from any client programs. Not sure whether I've made a bigger mess here or not...
* Fix up a security issue with the way we handle domain groups retuned on theAndrew Bartlett2002-01-261-0/+3
| | | | | | | | | | | info3. These are RIDs, and it only makes sense to combine them with the domain SID returned with them. This is important for trusted domains, where that sid might be other than the one we currently reterive from the secrets.tdb. Also remove the become_root()/unbecome_root() wrapper from around both remaining TDB users: Both are now initialised at smbd startup. Andrew Bartlett
* Ensure (C) message is output on startup.Jeremy Allison2002-01-181-2/+2
| | | | Jeremy.
* Roll back PSTR insertion.Martin Pool2002-01-161-23/+21
| | | | | Just leave the fstrcpy/pstrcpy bugfix, and conversion to pstr_sprintf rather than manual calculation of length.
* Convert to the new pstring interface. This diff is a pretty goodMartin Pool2002-01-151-26/+29
| | | | | | | | | | | example of the scope of change the new pstrings would entail: basically inserting PSTR() or FSTR() everywhere you need to coerce one to a char*. It's also a good example of the kind of bug we might catch: on about line 540, we were doing a pstrcpy into an fstring, which might overflow. It's not a problem in this particular case, but it is in general.
* Removed MAXSTATUS which was set incorrectly - thus causing tdb traversalJeremy Allison2002-01-141-16/+9
| | | | | | of the connections db on smbd startup. This should fix the Solaris large load bug.... (fingers crossed). Jeremy.
* 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
* Add two more memory-debug smbcontrol messages: these ones shouldMartin Pool2002-01-091-0/+1
| | | | | prompt dmalloc to log information about what happening, so you can see in flight why smbd is getting bloated.
* Better explanation message for dmalloc.Martin Pool2002-01-091-1/+1
| | | | | | | | | | Also more insertion of parenthesis to handle struct members called 'free'. You can now get useful dmalloc output, as long as it is compatible with your C library. On RH7.1 it looks like you have to rebuild dmalloc to allow free(0) by default, because something in libcrypt does that. (sigh)
* Add UNUSED(paramname) macro to be used in parameter lists, to quietenMartin Pool2002-01-091-1/+2
| | | | gcc warnings about unused parameters.
* Fixed up atomic update code.Jeremy Allison2002-01-091-2/+2
| | | | Jeremy.
* I've decided to move the auth code around a bit more...Andrew Bartlett2002-01-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The auth_authsupplied_info typedef is now just a plain struct - auth_context, but it has been modified to contain the function pointers to the rest of the auth subsystem's components. (Who needs non-static functions anyway?) In working all this mess out, I fixed a number of memory leaks and moved the entire auth subsystem over to talloc(). Note that the TALLOC_CTX attached to the auth_context can be rather long-lived, it is provided for things that are intended to live as long. (The global_negprot_auth_context lasts the whole life of the smbd). I've also adjusted a few things in auth_domain.c, mainly passing the domain as a paramater to a few functions instead of looking up lp_workgroup(). I'm hopign to make this entire thing a bit more trusted domains (as PDC) freindly in the near future. Other than that, I moved a bit of the code around, hence the rather messy diff. Andrew Bartlett
* smbd should register to receive MSG_REQ_POOL_USAGE. Response shouldMartin Pool2002-01-031-0/+1
| | | | be information about memory usage, but this is not done yet.
* When running interactive we want to set our own process group forJeremy Allison2001-12-301-0/+9
| | | | | signal management. Jeremy.
* Fixup -i interactive modes.Jeremy Allison2001-12-291-6/+12
| | | | Jeremy.
* Removed global debugf. Replaced with lp_set_logfile(name).Jeremy Allison2001-12-201-5/+7
| | | | | Fixed winbindd to finally stop leaving log. file droppings :-). Jeremy.
* added a tdb to store the account policy informations.Jean-François Micouleau2001-12-031-4/+9
| | | | | | | | | | | | | | You can change them with either usermanager->policies->account or from a command prompt on NT/W2K: net accounts /domain we can add a rpc accounts to the net command. As the net_rpc.c is still empty, I did not start. How should I add command to it ? Should I take the rpcclient/cmd_xxx functions and call them from there ? alse changed the SAM_UNK_INFO_3 parser, it's an NTTIME. This one is more for jeremy ;-) J.F.
* This is another rather major change to the samba authenticaionAndrew Bartlett2001-11-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Removed TimeInit() call from every client program (except for one placeTim Potter2001-11-231-2/+0
| | | | | in smbd/process.c where the timezone is reinitialised. Was replaced with check for a static is_initialised boolean.
* Store some path names in global variables initialized to configureMartin Pool2001-11-191-7/+7
| | | | default, rather than in preprocessor macros.
* lets try the new mangling codeSimo Sorce2001-10-221-0/+5
| | | | | | | all the calls go through a compatibility interface will change that soon a new mangle.tdb file will be set in the lock directory it contains a static mapping longname<->manglename
* Merge the become_XXX -> change_to_XXX fixes from 2.2.2 to HEAD.Jeremy Allison2001-10-181-4/+5
| | | | | Ensure make_conection() can only be called as root. Jeremy.
* got rid of start_background_queue()Andrew Tridgell2001-10-181-1/+6
| | | | | | | THIS WAS A DISASTER! it created hundreds of processes on the build farm machines, which we can't kill.
* very simple asynchronous "lpq" thread patchJean-François Micouleau2001-10-161-0/+2
| | | | | | | | | | | | To speed up operations with the lpq command, it's now run in a separate asynchronous process. Opening the Printers folder on NT is now fast ;-) I think even faster than with a ** server Jeremy, you should look at that patch to include it in 2.2.3 J.F.
* switched over to a new method of handling uppercase/lowercase mappingsAndrew Tridgell2001-10-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | for unicode strings. The new method relies on 3 files that are mmap'd at startup to provide the mapping tables. The upcase.dat and lowcase.dat tables should be the same on all systems. The valid.dat table says what characters are valid in 8.3 names, and differs between systems. I'm committing the japanese valid.dat here, in future we need some way of automatically installing and choosing a appropriate table. This commit also adds my mini tdb based gettext replacement in intl/lang_tdb.c. I have not enabled this yet and have not removed the old gettext code as the new code is still being looked at by Monyo. Right now the code assumes that the upcase.dat, lowcase.dat and valid.dat files are installed in the Samba lib directory. That is not a good choice, but I'll leave them there until we work out the new install directory structure for Samba 3.0. simo - please look at the isvalid_w() function and think about using it in your new mangling code. That should be the final step to correctly passing the chargen test code from monyo.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-2/+0
|
* Add the ability to display Samba's build options with smbd -b and as a level 4Andrew Bartlett2001-09-191-16/+23
| | | | | | | | | | | | | | | | | DEBUG(). Also included are details like build date/time, location and compiler. This should get most of the options we set, except those that don't affect smbd, like WITH_PAM_SMBPASSWD or WITH_WINBINDD. This work due to Vance Lankhaar <vlankhaar@hotmail.com> Some work needs to be done to make it only rebuild when needed (ie smbd being rebuilt) but its in pretty good shape already. Also fix up some printf() -> d_printf(). Andrew Bartlett
* printf() -> d_printf()Andrew Bartlett2001-09-191-1/+1
|
* added a hook to reopen all tdb's after the server forkAndrew Tridgell2001-09-191-0/+3
| | | | this prevents the fd seek pointer problem
* replaced stdio in many parts of samba with a XFILE. XFILE is a cut-downAndrew Tridgell2001-09-101-5/+0
| | | | | | | | | replacemnt of stdio that doesn't suffer from the 8-bit filedescriptor limit that we hit with nasty consequences on some systems I would eventually prefer us to have a configure test to see if we need to replace stdio, but for now this code needs to be tested widely so I'm enabling it by default.
* Added dummy handlers for SAM_SYNC and SAM_REPL messages.Tim Potter2001-08-281-0/+30
|
* A few changes:Andrew Bartlett2001-08-221-6/+2
| | | | | | | | | | | | drop paramaters: status utmp hostname change session code to always record each vuid current on the server. The sessionid struct is no longer packed, as I couldn't get that to work ;-) change smbstatus to show this info and less of the connections.tdb info (its not actualy that accurate). I'll get swat doing some of this shortly.
* Try to set the socket options early for some OSs (like Sol 8) where theyAndrew Bartlett2001-08-091-1/+8
| | | | | | can't be set after the listen(). Andrew Bartlett
* Fixes from Jens-Uwe.Walther@force.de to make the -l option behaveJeremy Allison2001-07-171-1/+1
| | | | | consistently. Jeremy.
* added winbind_exclude_domain() so smbd can tell the winbind clientAndrew Tridgell2001-07-101-0/+5
| | | | | code not to do lookups for a particular domain. This allows winbind to operate on a Samba PDC
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-2/+2
| | | | can't redefine them. damn.
* The big character set handling changeover!Andrew Tridgell2001-07-041-4/+0
| | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation.
* fixed usage of socklen_t and also tidied up SIG_ATOMIC_T, using a typedef ↵Andrew Tridgell2001-06-251-3/+3
| | | | instead of a define
* - make the regresison test mode code build in by default. This shouldAndrew Tridgell2001-06-251-11/+1
| | | | | allow us to have test targets without special configure options - fixed make proto so that it actually does something
* added the ability to test smbd safely as an ordinary user. The way it works isAndrew Tridgell2001-06-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | that libsmb/ creates a local tcp socket then launches smbd as a subprocess attached to that socket. smbd thinks it is being launched from inetd. to use it do the following: - compile with -DSMB_REGRESSION_TEST - run like this (also works with smbtorture etc) export SMBD_TEST=1 export LIBSMB_PROG=bin/smbd smbclient //server/share -Uuser%pass obviously you need to setup a smb.conf etc. Using --prefix to configure is useful. The aim of all this stuff is to add a decent set of regression tests to the build farm, so we know if smbd actually runs correctly on all the platforms, not just builds. We can run smbtorture, masktest, locktest etc, plus a bunch of smbclient scripts and any new tests we write. This doesn't help much with nmbd (at least not yet) but its a good start.
* Added tdb_change_int_atomic() to allow atomic updates of a tdb int value.Jeremy Allison2001-05-251-5/+3
| | | | Jeremy.
* Patch from ackley@cs.unm.edu to clear server_fd/client_fd in root daemon to stopJeremy Allison2001-05-081-0/+10
| | | | | %I getpeername() failure. Jeremy.
* merge from 2.2Andrew Tridgell2001-04-181-1/+3
|
* Added set/get SD's on shares. Check before tcon.Jeremy Allison2001-04-091-0/+4
| | | | Jeremy.
* Got "medieval on our ass" about adding the -1 to slprintf.Jeremy Allison2001-04-081-1/+1
| | | | Jeremy.
* first pass of the new group mapping codeJean-François Micouleau2001-03-231-0/+5
| | | | J.F.
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-9/+0
| | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy.
* samba/source/nmbd/nmbd.c change remote_machine name to nmbd insteadHerb Lewis2001-02-151-1/+1
| | | | | | | | | | | | of nmb so we write to same log file that was originally created as log.nmbd samba/source/smbd/server.c change remote_machine name to smbd instead of smb so we write to same log file that was originally created as log.smbd samba/source/lib/interface.c allow binding to all interface IP addresses even if on same subnet. This allows you to specify which IP's you want in interfaces line and use bind interfaces only