summaryrefslogtreecommitdiffstats
path: root/source/smbd/service.c
Commit message (Collapse)AuthorAgeFilesLines
* fixed "admin users" option with new security codeAndrew Tridgell2000-08-311-0/+5
|
* Merge from appliance branch.Tim Potter2000-08-281-0/+1
|
* Added an NT_USER_TOKEN structure that is copied/passed around associatedJeremy Allison2000-08-031-65/+73
| | | | | | | with the current user. This will allow se_access_check() to quickly do a SD check without having to translate uid/gid's to SIDs. Still needs work on pipe calls. Jeremy.
* Started to canonicalize our handling of uid -> sid code in order toJeremy Allison2000-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | get ready and fix se_access_check(). Added cannonical lookup_name(), lookup_sid(), uid_to_sid(), gid_to_sid() functions that look via winbind first the fall back on local lookup. All Samba should use these rather than trying to call winbindd code directly. Added NT_USER_TOKEN struct in user_struct, contains list of NT sids associated with this user. se_access_check() should use this (cached) value rather than attempting to do the same thing itself when given a uid/gid pair. More work needs to be done to preserve these things accross security context changes (especially with the tricky pipe problem) but I'm beginning to see how this will be done..... probably by registering a new vuid for an authenticated RPC pipe and not treating the pipe calls specially. More thoughts needed - but we're almost there... Jeremy.
* Fix for mounting a printer as a share. Not that there's anythingTim Potter2000-07-251-0/+5
| | | | | | | | | | specifically wrong with this, but Samba is fooled by the client into thinking the printer is a file share. Files copied to the share gather dust in the spool directory and aren't printed. This patch has the effect of not allowing printers to be mounted as file shares. Not sure whether this is the correct solution or not. {Jeremy,JF,Tridge} please check!
* Fixed bug where file access was allowed on IPC$ share.Jeremy Allison2000-05-231-2/+2
| | | | | Return correct error codes on invalid share name. Jeremy.
* added spool_io_printer_driver_info_level_6()Andrew Tridgell2000-05-121-1/+1
| | | | | | thsi function and the associated header structure were autogenerated using a little awk based code geerator I wroe ths evening. I'll commit that next ...
* - changed smb_getpwnam() to use winbind style usernamesAndrew Tridgell2000-05-101-1/+1
| | | | - finished ntdom -> winbind rename in head
* more merging voodooAndrew Tridgell2000-05-101-0/+4
| | | | | | this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic - this isn't permanent, it should go after another few merge steps have been done
* a minimal change to get appliance mode to work with winbinddAndrew Tridgell2000-05-041-2/+2
| | | | | | | | | we needed to accept usernames of the form DOMAIN/user, which means we needed to pass the domain to a getpwnam() like routine in certain critical spots. What I'd rather do is get rid of "char *user" everywhere and use the new userdom_struct, but that will have to wait a few days.
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-021-1/+1
| | | | | of doing a system call every time we want to just get our pid. Jeremy.
* Moved deletion of vfs handle into smbd/conn.c as it was being done tooJeremy Allison2000-04-281-16/+0
| | | | | | | | | | soon in smbd/service.c (file operations were being done after the handle was closed). It looks cleaner in smbd/conn.c as it is part of the closing of a conn struct anyway. Jeremy.
* don't copy a null groups listAndrew Tridgell2000-04-221-2/+6
|
* - got rid of the "passive" optionAndrew Tridgell2000-04-191-5/+5
| | | | - cleaned up the standard_sub_*() calls a lot
* finally got sick of the "extern int Client" code and the stupidAndrew Tridgell2000-04-111-5/+3
| | | | | | | | | | | | | | | | assumption that we have one socket everywhere while doing so I discovered a few bugs! 1) the clientgen session retarget code if used from smbd or nmbd would cause a crash as it called close_sockets() which closed our main socket! fixed by removing close_sockets() completely - it is unnecessary 2) the caching in client_addr() and client_name() was bogus - it could easily get fooled and give the wrong result. fixed. 3) the retarget could could recurse, allowing an easy denial of service attack on nmbd. fixed.
* Mega-VFS merge. Yeah baby!Tim Potter2000-02-031-1/+91
| | | | | Synopsis: change every disk access function to work through a vfs_ops structure contained in the connection_struct.
* first cut at using the tdb code for the connections structure, theAndrew Tridgell1999-12-211-4/+4
| | | | | SWAT status page and smbstatus. It made the code _much_ simpler, I wish we'd done a database module a long time ago!
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-144/+118
|
* changed function name of get_home_dir() to get_unixhome_dir(), to stopLuke Leighton1999-12-121-2/+2
| | | | | | | clash with gnu readline library. fixed issue with [homes] service not being there - call lp_add_home() just before starting the msrpc processing.
* Copy service name into vfs_connection_struct.Tim Potter1999-07-221-0/+2
|
* improving authentication code (tidyup).Luke Leighton1999-06-291-2/+2
|
* Moved code that changes the pw_passwd entry (i.e shadow password andTim Potter1999-06-131-1/+1
| | | | | | | | weird unixware stuff) into _Get_Pwnam() to fix a memory allocation bug. Note that the Get_Pwnam() function now returns a const struct passwd * as a hint to other developers not to change entries in the struct passwd.
* Changed the way a VFS is initialised. The vfs_init() function isTim Potter1999-04-201-4/+51
| | | | | | | | | | | | executed from the VFS object file and it returns a pointer to a vfs_ops structure. If any of the function pointers in vfs_ops are NULL, then they are replaced with the standard disk functions. This should allow disk-related VFS modules to be easily added. I've written an auditing VFS module which logs various calls (connect, disconnect, mkdir, rmdir, open and a few others) to syslog in a couple of pages of code. Thanks to tridge for various useful suggestions.
* Disable VFS routines if no libdl available.Tim Potter1999-04-051-0/+7
|
* Call VFS initialisation, share connect and share disconnect functions.Tim Potter1999-04-041-1/+35
| | | | | | | | | Initialise VFS function pointers with symbols from the 'vfs object' file, use disk pointers otherwise. Added a hook to check for a 'default' VFS share (like the [homes] section). Currently empty - I'm unsure whether this will be useful or not.
* trying to track down issues in get_home_dir().Luke Leighton1998-12-141-2/+4
|
* don't allow ".." in service name when doing "default service"Andrew Tridgell1998-11-291-1/+3
| | | | processing.
* Makefile.in: Added maintainer mode fixes.Jeremy Allison1998-11-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | aclocal.m4: Added AC_LIBTESTFUNC. configure.in: Fixed -lsecurity -lsec problems. client.c: dos_ fixes. groupdb/aliasunix.c: Dead code removal. include/includes.h: Added default PRINTCAP_NAME. lib/genrand.c: dos_ fixes. lib/replace.c: Added strtoul. lib/system.c: dos_ fixes. lib/util.c: dos_ fixes. lib/util_sid.c: Signed/unsigned fixes. lib/util_str.c: removed bad const. locking/locking_slow.c: dos_ fixes. printing/printing.c: dos_ fixes. rpc_server/srv_samr.c: Dead code removal. rpc_server/srv_sid.c: global_myworkgroup defined with wrong size AGAIN ! smbd/dir.c: dos_ fixes. smbd/open.c: dos_ fixes. smbd/oplock.c: dos_ fixes. smbd/reply.c smbd/server.c smbd/service.c smbd/uid.c: dos_ fixes. Jeremy.
* - group database API. oops and oh dear, the threat has been carried out:Luke Leighton1998-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the pre-alpha "domain group" etc parameters have disappeared. - interactive debug detection - re-added mem_man (andrew's memory management, detects memory corruption) - american spellings of "initialise" replaced with english spelling of "initialise". - started on "lookup_name()" and "lookup_sid()" functions. proper ones. - moved lots of functions around. created some modules of commonly used code. e.g the password file locking code, which is used in groupfile.c and aliasfile.c and smbpass.c - moved RID_TYPE_MASK up another bit. this is really unfortunate, but there is no other "fast" way to identify users from groups from aliases. i do not believe that this code saves us anything (the multipliers) and puts us at a disadvantage (reduces the useable rid space). the designers of NT aren't silly: if they can get away with a user- interface-speed LsaLookupNames / LsaLookupSids, then so can we. i spoke with isaac at the cifs conference, the only time for example that they do a security context check is on file create. certainly not on individual file reads / writes, which would drastically hit their performance and ours, too. - renamed myworkgroup to global_sam_name, amongst other things, when used in the rpc code. there is also a global_member_name, as we are always responsible for a SAM database, the scope of which is limited by the role of the machine (e.g if a member of a workgroup, your SAM is for _local_ logins only, and its name is the name of your server. you even still have a SID. see LsaQueryInfoPolicy, levels 3 and 5). - updated functionality of groupname.c to be able to cope with names like DOMAIN\group and SERVER\alias. used this code to be able to do aliases as well as groups. this code may actually be better off being used in username mapping, too. - created a connect to serverlist function in clientgen.c and used it in password.c - initialisation in server.c depends on the role of the server. well, it does now. - rpctorture. smbtorture. EXERCISE EXTREME CAUTION.
* Got very strict about the differences and uses ofJeremy Allison1998-09-291-1/+1
| | | | | | | uid_t, gid_t and vuid. Added sys_getgroups() to get around the int * return problem. Set correct datatypes for all uid, gid and vuid variables. Jeremy.
* this completes the splitup of server.c.Andrew Tridgell1998-08-171-0/+542
the splitup was done with an axe, not a scalpel, so there are some rough edges. I mostly wanted to get the general form right with fine tuning of what goes where to come later. Still, this is better than what we had before where server.c was a general repository for anything that didn't fit elsewhere.