summaryrefslogtreecommitdiffstats
path: root/source/smbd/service.c
Commit message (Collapse)AuthorAgeFilesLines
* This changes our handling of invalid service types that theVolker Lendecke2003-03-301-7/+12
| | | | | | | | | client requested on tconx. We now return the same error code like NT4SP6 and W2kSP3 return. TCONDEV is a little test for this. Volker
* Ensure dev in make_connection is const.Jeremy Allison2003-03-181-3/+9
| | | | Jeremy.
* Missed one when I move 'share_sanity_checks' to use an fstring for 'dev'.Andrew Bartlett2003-03-161-1/+1
| | | | Andrew Bartlett
* Make sure we mark the assumption of a fstring parameter for 'devicetype'Andrew Bartlett2003-03-161-6/+6
| | | | | | in the function prototype, and change callers to respect this. Andrew Bartlett
* Fix logfile formatting, we were missing a "\n"Andrew Bartlett2003-02-191-2/+2
|
* This patch fixes one of my longest-standing pet hates with Samba :-).Andrew Bartlett2003-02-171-9/+9
| | | | | | | | | | | | | | | | | When we look see if a user is in a list, and we try to 'expand' an @group, we should lookup the user's own list of groups, rather than looking for all the members of a group. I'm sure this will fix some nasty performance issues, particularly on large domains etc. In particular, this avoids contacting winbind at all, if the group is not a winbind group. (This caused a deadlock on my winbind-on-PDC setup). The groups list always includes the user's primary group, as per the getgrouplist manpage, and my recent changes to our implementation. Andrew Bartlett
* Oops, this is the change to use an fstring for the incoming service buffer -Andrew Bartlett2003-01-121-3/+3
| | | | | | | the commit to reply.c just matches a pstrcpy for the pstring. (harmless, fixes it for the automated test). Andrew Bartlett
* Fix a segfault when we don't correctly load a VFS module (don't keep it inAndrew Bartlett2003-01-061-3/+3
| | | | | | | | | | | the loaded list on error). Also change some of the error returns, becouse NT_STATUS_UNSUCCESSFUL gives a most useless error message on the client. As for which error, my logic is that a share without a valid VFS module is not a valid share, and therefore should return the same error as a non-existant share. Andrew Bartlett
* Add msdfs proxy functionality to HEAD.Shirish Kalele2002-12-291-0/+7
|
* a better for for using %U in smb.confAndrew Tridgell2002-11-191-3/+0
| | | | | this follows the method used for remote_machine and also fixes the problem of anonymous connections clobbering the string
* the change in the way %U is handled to use current_user has brokenAndrew Tridgell2002-11-181-0/+3
| | | | | | | some basic usages like 'include = smb.conf.%U' This changes fixes things again, by checking for reload after we setup current_user in tconx.
* Removed global_myworkgroup, global_myname, global_myscope. Added liberalJeremy Allison2002-11-121-2/+2
| | | | | | dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy.
* Add bcast_msg_flags to connection struct. Allows sender to filter whenJeremy Allison2002-09-041-1/+1
| | | | | | sending broadcast messages. Also initial cut-down of printing notify messages (not yet finished). Jeremy.
* Updates!Andrew Bartlett2002-08-261-1/+1
| | | | | | | | | | | - Don't print an uninitialised buffer in service.c - Change some charcnv.c functions to take smb_ucs2_t ** instead of void ** - Update NTLMv2 code to use dynamic buffers - Update experimental SMB signing code - still more work to do - Move sys_getgrouplist() to SAFE_FREE() and do a DEBUG() on initgroups() failure. Andrew Bartlett
* Based orginally by work by Kai, this patch moves our NT_TOKEN generation intoAndrew Bartlett2002-08-201-15/+20
| | | | | | | | | | | | | | | our authenticaion code - removing some of the duplication from the current code. This also gets us *much* closer to supporting a real SAM backend, becouse the SAM can give us the right info then. This also changes our service.c code, so that we do a VUID (rather than uid) cache on the connection struct, and do full NT ACL/NT_TOKEN checks (or cached equivilant) on every packet, for the same r or rw mode the whole share was open for. Andrew Bartlett
* Add const.Andrew Bartlett2002-08-171-1/+1
|
* Make 'remote_machine' private to lib/substitute.c, and fix all the user to useAndrew Bartlett2002-08-111-6/+4
| | | | | | the new accessor functions. Andrew Bartlett
* This should fix a nastly little bug where if a user had already done oneAndrew Bartlett2002-07-271-6/+10
| | | | | | | | | | | | session setup, it would not correctly pick up the [homes] share on a subsequent session setup. The new rules are: If you want to connect to [homes], then it must have been available at session setup time, or you must be in security=share. At each session setup, the user's copy of [homes] is updated to ensure it has the right path etc. Andrew Bartlett
* If lp_add_home() fails, don't go any further, just return -1.Andrew Bartlett2002-07-241-1/+3
| | | | Andrew Bartlett
* Give an idea what service didn't have the directory.Andrew Bartlett2002-07-241-1/+1
|
* Use of uninitialized variable caught by valgrind.Jeremy Allison2002-07-181-1/+1
| | | | Jeremy.
* fixed a call to get_current_groups()Andrew Tridgell2002-07-151-1/+1
|
* last check in for tonight.Gerald Carter2002-07-111-1/+1
| | | | | | | | | | * DeletePrinterDriverEx() now has the ability to delete driver files. I need to do some more testing tro veriofy that we are in fact not deleting a file out from under another driver, but it looks ok so far. * DeletePrinterDriver() noiw deletes all versions of the specified driver (cversion == 0, 1, 2, 3)
* Fix from Andrew Esh for coredump...Jeremy Allison2002-07-041-8/+11
| | | | Jeremy.
* Always free_conn() after all the DEBUG()s etc.Andrew Bartlett2002-07-041-3/+3
|
* Address the string_sub problem by changing len = 0 to mean "no expand".Jeremy Allison2002-07-021-5/+5
| | | | | | Went through and checked all string_subs I could to ensure they're being used correctly. Jeremy.
* It's fairly obvious that no one has tried to upload a driverGerald Carter2002-06-271-0/+28
| | | | | | | | | | to a Samba print server running HEAD in a while. This has been broken since tridge's changes to make_connection() to not do the chdir() to the connect_path. Sorry it took me so long to get around to fixing it. The problem occured with our internal use of make_connection(). jerry
* Further updates to the service.c code. authorise_login() is now a bit simpilerAndrew Bartlett2002-06-161-3/+5
| | | | | | | | | and we seem to have eliminated the segfault. Unfortunetly I'm still at a bit of a loss as to why it did segfault, but the patch is correct in any case. Andrew Bartlett
* Rework much of the service.c code:Andrew Bartlett2002-06-151-100/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim of this execise is to give the 'security>=user' code a straight paper path. Security=share will sill call authorise_login(), but otherwise we avoid that mess. This allow *much* more accurate error code reporting, beocuse we don't start pretending that we can use the (nonexistant) password etc. Also in this patch is code to create the 'homes' share at session setup time (as we have done in the past - been broken recently) and to record this on the user's vuser struct for later reference. The changes here should also allow for much better use of %H (some more changes to come here). The service.c changes move a lot of code around, but are not as drastric as they look... (Also included is a fix to srv_srvsvc_nt.c where 'total_entries' not '*total_entries' was compared). This code is needs testing, but passes my basic tests. I expect we have lost some functionality, but the stuff I had expected to loose was already broken before I started. In particular, we don't 'fall back' to guest if the user cannot access a share (for security=user). If you want this kind of stuff then you really want security=share anyway. Andrew Bartlett
* moved lp_list_* functions away from param/loadparm.c, put int lib/util_str.cSimo Sorce2002-06-141-6/+6
| | | | | and renamed to str_list_* as it is a better name. Elrond should be satisfied now :)
* A few things in this commit:Andrew Bartlett2002-05-181-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cleanup some of the code in net_rpc_join re const warnings and fstrings. Passdb: Make the %u and %U substituions in passdb work. This is done by declaring these paramters to be 'const' and doing the substitution manually. I'm told this is us going full circle, but I can't really see a better way. Finally these things actually seem to work properly... Make the lanman code use the pdb's recorded values for homedir etc rather than the values from lp_*() Add code to set the plaintext password in the passdb, where it can decide how to store/set it. For use with a future 'ldap password change' option, or somthing like that... Add pdb_unix, so as to remove the 'not in passdb' special cases from the local_lookup_*() code. Quite small, as it uses the new 'struct passwd -> SAM_ACCOUNT' code that is now in just one place. (also used by pdb_smbpasswd) Other: Fix up the adding of [homes] at session setup time to actually pass the right string, that is the unix homedir, not the UNC path. Fix up [homes] so that for winbind users is picks the correct name. (bad interactions with the default domain code previously) Change the rpc_server/srv_lsa_nt.c code to match NT when for the SATUS_NONE_MAPPED reply: This was only being triggered on no queries, now it is on the 'no mappings' (ie all mappings failed). Checked against Win2k. Policy Question: Should SID -> unix_user.234/unix_group.364 be considered a mapping or not? Currently it isn't. Andrew Bartlett
* make sure that we leave the tree unused after disconnectingAndrew Tridgell2002-04-151-0/+4
|
* win2000 does not check the permissions on the share directory onAndrew Tridgell2002-04-141-3/+19
| | | | | | | tconx, so win2000 clients don't expect a permissions error in tconx. We now match this behaviour, by only checking that the directory exists during tconx and relying on the permissions on other calls to protect directories
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Some more 'winbind default domain' support patches from Alexander BokovoyAndrew Bartlett2002-01-271-6/+2
| | | | | | | | | | | <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
* Separate out get_user_home_dir() from get_user_home_service_dir().Jeremy Allison2002-01-161-2/+2
| | | | Jeremy.
* Roll back PSTRING_SANCTIFY patch; just leave non-controversial typeMartin Pool2002-01-161-16/+23
| | | | and constness changes.
* Removed MAXSTATUS which was set incorrectly - thus causing tdb traversalJeremy Allison2002-01-141-10/+4
| | | | | | of the connections db on smbd startup. This should fix the Solaris large load bug.... (fingers crossed). Jeremy.
* Make this error match Win2k.Andrew Bartlett2002-01-111-1/+1
|
* Added NT_USER_TOKEN into server_info to fix extra groups problem.Jeremy Allison2001-11-031-1/+1
| | | | | Got "medieval on our ass" about const warnings (as many as I could :-). Jeremy.
* This is a farily large patch (3300 lines) and reworks most of the AuthRewriteAndrew Bartlett2001-10-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* This commit is number 3 of 4.Andrew Bartlett2001-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* add non_root_mode() checkAndrew Tridgell2001-10-201-1/+1
|
* Merge the become_XXX -> change_to_XXX fixes from 2.2.2 to HEAD.Jeremy Allison2001-10-181-28/+30
| | | | | Ensure make_conection() can only be called as root. Jeremy.
* Renamed vfs_init() to smbd_vfs_init() to allow vfs modules to compile.Tim Potter2001-10-181-1/+1
|
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-4/+0
|
* Rearrange the ordering of the checks in make_connection(). The new order hasAndrew Bartlett2001-09-201-37/+56
| | | | | | | | | some sainity, avoiding things like 'root preexec' when the connection would otherwise already be denied (max connections). This does change behaviour, but I think its for the best. Andrew Bartlett
* got rid of bogus write list substitution error messagesAndrew Tridgell2001-09-191-15/+18
|
* Kill off the //server/share%user hack in share level security.Andrew Bartlett2001-09-151-20/+13
| | | | | | This should help make much of this code simpiler. Andrew Bartlett