summaryrefslogtreecommitdiffstats
path: root/source/smbd/service.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Actually fill in the status for sainity checksAndrew Bartlett2001-09-151-1/+1
| | | | Andrew Bartlett
* converted another bunch of stuff to NTSTATUSAndrew Tridgell2001-08-271-22/+22
|
* OK, so not freeing these was a mistake. I'll try to be less exuberent nextAndrew Bartlett2001-08-171-0/+2
| | | | time :-)
* Move the claim_connection stuff till a little later in the process.Andrew Bartlett2001-08-171-16/+14
| | | | (You don't have to clean up somthing you haven't done yet...)
* Move admin user check into a helper function.Andrew Bartlett2001-08-171-18/+35
| | | | Formatting fixes.
* Move read only check into a helper funcion. Ensure conn->service is setAndrew Bartlett2001-08-171-40/+50
| | | | before we use it to find a share's details.
* smbd/auth_server: Doco, we want to use cli_nt_error here soonAndrew Bartlett2001-08-171-30/+43
| | | | | | | | | smbd/password.c: We don't use globals here anymore smbd/reply.c: Tidyness, global_myworkgroup must die! smbd/service.c: Move some of the make_connection code into a helper function.
* better debug messages + fix typo in debug messageSimo Sorce2001-07-261-2/+2
|
* - don't try to print pointersAndrew Tridgell2001-07-251-2/+2
| | | | - removed some unused mangling code
* Convert other parameters (read list, write list, valid users...) to the ↵Simo Sorce2001-07-241-12/+17
| | | | | | | P_LIST format. changed functions to use list instead of strings addedd lp_list_substitute function
* Tidied up calling yield_connection on connection allocation fail.Jeremy Allison2001-07-171-0/+4
| | | | | Restore debug message to level zero. Jeremy.
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-1/+1
| | | | can't redefine them. damn.
* The big character set handling changeover!Andrew Tridgell2001-07-041-3/+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.
* Ensured all the system calls in msdfs.c go through the vfs layer.Jeremy Allison2001-06-291-22/+4
| | | | | | Added vfs calls to symlink() and readlink() with appropriate configure checks. Jeremy.
* added a close-share smbcontrol message that forcibly closes a share in smbd ↵Andrew Tridgell2001-06-201-0/+2
| | | | (to allow unmount)