summaryrefslogtreecommitdiffstats
path: root/source/smbd
Commit message (Collapse)AuthorAgeFilesLines
* Removed version number from file header.Tim Potter2002-01-3048-95/+48
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* merge from 2.2Gerald Carter2002-01-301-1/+8
|
* Fix "strict allocate" to write the data out on ftruncate with extend.Jeremy Allison2002-01-291-8/+70
| | | | Jeremy.
* 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...
* Some more 'winbind default domain' support patches from Alexander BokovoyAndrew Bartlett2002-01-272-7/+3
| | | | | | | | | | | <a.bokovoy@sam-solutions.net>. This patch is designed to remove the 'special cases' required for this support. In particular this now kills off winbind_initgroups, as it appears no longer to be required. Andrew Bartlett
* Yes, dev is an 'input/output' paramater...Andrew Bartlett2002-01-271-2/+2
| | | | Andrew Bartlett
* - Provide sid->name lookup support for non-unix accounts.Andrew Bartlett2002-01-261-36/+33
| | | | | | | | | - Rework the name -> sid lookup function to always try local lookup first (for local domain names) before trying winbind. This seems to eliminate my winbind feedback loop problems. (I don't use winbind for nsswitch, where there are almost certainly further issues). Andrew Bartlett
* Rework lookup_name() to take seperate username/domain args, and to removeAndrew Bartlett2002-01-261-31/+24
| | | | | varioius crazy 'if winbind didn't find it' cases. This makes winbind default domain support easier to intergrate with smbd.
* 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
* Fixed display of "remote downlevel document" in old print job submissionJeremy Allison2002-01-252-2/+2
| | | | | case. Jeremy.
* merge from 2.2Gerald Carter2002-01-251-1/+1
|
* Fix a 'const' warning.Andrew Bartlett2002-01-251-1/+1
|
* micro fix :-)Simo Sorce2002-01-251-0/+1
|
* minor fixesSimo Sorce2002-01-251-3/+5
|
* handle filenames like .bashrc better in the new mangling codeAndrew Tridgell2002-01-241-8/+12
|
* Check request flag for unicode capability and respond accordingly, rather ↵Jim McDonough2002-01-231-1/+2
| | | | than only doing unicode. smbfs didn't work.
* Oops...Andrew Bartlett2002-01-231-1/+1
|
* Change the order of this a bit - as unix password change can fail.Andrew Bartlett2002-01-231-11/+12
| | | | | | This due for abstraction into chgpasswd.c shortly. Andrew Bartlett
* Ensure fsp->size is correct so readraw's return correct data.Jeremy Allison2002-01-221-9/+14
| | | | Jeremy.
* Found and fixed the logic bug in write cache code. Amazingly helpfulJeremy Allison2002-01-211-4/+10
| | | | | work from Juergen.Hasch@de.bosch.com in tracking this down. Jermy.
* One less Get_Pwnam_Modify call!Andrew Bartlett2002-01-211-5/+0
| | | | | | (the passdb backend is case-insensitive, so there isn't any point to this). Andrew Bartlett
* Spelling fixes.Tim Potter2002-01-201-7/+7
|
* This is another *BIG* change...Andrew Bartlett2002-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Samba now features a pluggable passdb interface, along the same lines as the one in use in the auth subsystem. In this case, only one backend may be active at a time by the 'normal' interface, and only one backend per passdb_context is permitted outside that. This pluggable interface is designed to allow any number of passdb backends to be compiled in, with the selection at runtime. The 'passdb backend' paramater has been created (and documented!) to support this. As such, configure has been modfied to allow (for example) --with-ldap and the old smbpasswd to be selected at the same time. This patch also introduces two new backends: smbpasswd_nua and tdbsam_nua. These two backends accept 'non unix accounts', where the user does *not* exist in /etc/passwd. These accounts' don't have UIDs in the unix sense, but to avoid conflicts in the algroitmic mapping of RIDs, they use the values specified in the 'non unix account range' paramter - in the same way as the winbind ranges are specifed. While I was at it, I cleaned up some of the code in pdb_tdb (code copied directly from smbpasswd and not really considered properly). Most of this was to do with % macro expansion on stored data. It isn't easy to get the macros into the tdb, and the first password change will 'expand' them. tdbsam needs to use a similar system to pdb_ldap in this regard. This patch only makes minor adjustments to pdb_nisplus and pdb_ldap, becouse I don't have the test facilities for these. I plan to incoroprate at least pdb_ldap into this scheme after consultation with Jerry. Each (converted) passdb module now no longer has any 'static' variables, and only exports 1 init function outside its .c file. The non-unix-account support in this patch has been proven! It is now possible to join a win2k machine to a Samba PDC without an account in /etc/passwd! Other changes: Minor interface adjustments: pdb_delete_sam_account() now takes a SAM_ACCOUNT, not a char*. pdb_update_sam_account() no longer takes the 'override' argument that was being ignored so often (every other passdb backend). Extra checks have been added in some places. Minor code changes: smbpasswd no longer attempts to initialise the passdb at startup, this is now done on first use. pdbedit has lost some of its 'machine account' logic, as this behaviour is now controlled by the passdb subsystem directly. The samr subsystem no longer calls 'local password change', but does the pdb interactions directly. This allow the ACB_ flags specifed to be transferred direct to the backend, without interference. Doco: I've updated the doco to reflect some of the changes, and removed some paramters no longer applicable to HEAD.
* Kill off another ugly wart from the side of the passdb subsystem.Andrew Bartlett2002-01-201-0/+2
| | | | | | | | | | | | | This time its the pdb_getsampwuid() function - which was only being used by the SAMR rpc subsystem to gain a 'user session key'. This 'user session key' is actually generated at login time, and the other changes here simply move that data around. This also means that (when I check some details) we will be able to use the user session key, even when we are not actually the DC, becouse its one of the components of the info3 struct returned on logon. Andrew Bartlett
* Kill off the old varient of 'check_plaintext_password' (new version justAndrew Bartlett2002-01-202-103/+28
| | | | | | | committed in auth/auth_compat.c and use the new version to make the plaintext password change slightly sane... (Needs testing). Andrew Bartlett
* This is the current patch from Luke Leighton <lckl@samba-tng.org> to add aAndrew Bartlett2002-01-203-14/+18
| | | | | | | | | | | | | | | | | | degree of seperation betwen reading/writing the raw NamedPipe SMB packets and the matching operations inside smbd's RPC components. This patch is designed for no change in behaviour, and my tests hold that to be true. This patch does however allow for the future loadable modules interface to specify function pointers in replacement of the fixed state. The pipes_struct has been split into two peices, with smb_np_struct taking the information that should be generic to where the data ends up. Some other minor changes are made: we get another small helper function in util_sock.c and some of the original code has better failure debugs and variable use. (As per on-list comments). Andrew Bartlett
* This patch makes the 'winbind use default domain' code interact better withAndrew Bartlett2002-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Ensure identical between 2.2.3 and 3.0 - no need for difference here..Jeremy Allison2002-01-201-1/+0
| | | | Jeremy.
* Fix file size calculations for write cache code.Jeremy Allison2002-01-201-5/+41
| | | | Jeremy.
* Attempt to fix bugs in write cache code (yes I know it's going away :-).Jeremy Allison2002-01-202-3/+21
| | | | Jeremy.
* Report write fail in smb_dump.Jeremy Allison2002-01-191-1/+3
| | | | Jeremy.
* Ensure (C) message is output on startup.Jeremy Allison2002-01-181-2/+2
| | | | Jeremy.
* A nice *big* change to the fundemental way we do things.Andrew Bartlett2002-01-174-18/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* don't use O_NONBLOCK in open(). This was added erroneously for kernelAndrew Tridgell2002-01-171-4/+0
| | | | oplocks and really shouldn't be used
* Separate out get_user_home_dir() from get_user_home_service_dir().Jeremy Allison2002-01-161-2/+2
| | | | Jeremy.
* Fixup error mapping so we have only one table containing errno -> dos error ↵Jeremy Allison2002-01-161-38/+14
| | | | | | | -> NT STATUS maps. Fixes problem with disk full returning incorrect error. Jeremy.
* Roll back PSTRING_SANCTIFY patch; just leave non-controversial typeMartin Pool2002-01-161-16/+23
| | | | and constness changes.
* 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-143-27/+14
| | | | | | 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
* Added the O_NOFOLLOW flag if follow symlinks is set off.Jeremy Allison2002-01-121-0/+6
| | | | Jeremy.
* Same fix as went into 2.2 (I'm waiting for jerry to finish some code).Jeremy Allison2002-01-115-55/+55
| | | | Jeremy.
* fixed a crash in merge_aces()Andrew Tridgell2002-01-111-0/+1
| | | | when we free curr_ace_outer we need to not try to use it again :)
* Make this error match Win2k.Andrew Bartlett2002-01-111-1/+1
|
* Back out the crazy notion that the NTLMSSP flags actually mean anything...Andrew Bartlett2002-01-111-1/+12
| | | | | | | | Replace this with some flags that *we* define. We can do a mapping later if we actually get some more reliable info about what passwords are actually valid. Andrew Bartlett
* First part of UNIX extensions (#ifdefed out) more to follow.Jeremy Allison2002-01-102-2/+170
| | | | Jeremy.
* Getting ready to add UNIX extensions in HEAD also.Jeremy Allison2002-01-102-0/+32
| | | | Jeremy
* 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-093-7/+7
| | | | | | | | | | 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)