summaryrefslogtreecommitdiffstats
path: root/source/smbd
Commit message (Collapse)AuthorAgeFilesLines
...
* Call init_sec_ctx() instead of init_uid().Tim Potter2000-06-231-9/+1
| | | | Delete OriginalDir stuff.
* I've been working on refactoring some of the mess that is the become_user()Tim Potter2000-06-231-0/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | code. This code is now implemented as a stack of security contexts, where a security context is defined as a set of effective user, group and supplementary group ids. The following functions are implemented: BOOL push_sec_ctx(void); Create a new security context on the stack which is the same as the current security context. void set_sec_ctx(uid_t uid, gid_t gid, int ngroups, gid_t *groups); Set the current security context to a given set of user and group ids. void set_root_sec_ctx(void); Set to uid = gid = 0. No supplementary groups are set. BOOL pop_sec_ctx(void); Pop a security context from the stack and restore the user and group permissions of the previous context. void init_sec_ctx(void); Initialise the security context stack. This must be called before any of the other operations are used or weird things may happen. The idea is that there is a base security context which is either root or some authenticated unix user. Other security contexts can be pushed and popped as needed for things like changing passwords, or rpc pipe operations where the rpc pipe user is different from the smb user.
* Fixes for IRIX kernel oplocks and systems that don't have nss.hJeremy Allison2000-06-201-1/+1
| | | | Jeremy.
* Paranoia changes to ensure that anything touched by a signal handlerJeremy Allison2000-06-192-17/+18
| | | | | and the main code is declared as VOLATILE SIG_ATOMIC_T. Jeremy.
* Pass the vuid from the connection_struct to the printing back end functions.Tim Potter2000-06-161-6/+6
|
* open files with O_NONBLOCK when available. This is necessary toAndrew Tridgell2000-06-151-1/+6
| | | | | | | prevent possible deadlocks with kernel leases and harmless when kernel leases are not used. basically we don't ever want smbd to block
* added support for kernel level share modes. These are a (small) hack,Andrew Tridgell2000-06-151-1/+24
| | | | | I suspect we will either get rid of them or do them properly at some stage.
* allow the notify implementation to choose the select timeout changeAndrew Tridgell2000-06-144-16/+18
|
* ZERO_STRUCT() of info3 structure before using it.Tim Potter2000-06-141-0/+2
|
* Removed a patch that Andrew had added because 'insure' was incorrectlyChristopher R. Hertel2000-06-131-9/+0
| | | | | reporting a memory leak in the cache module. I've modified the cache code to prevent insure getting confused, so the patch can now be removed.
* use DN_ATTRIB kernel change notify attributeAndrew Tridgell2000-06-131-3/+7
|
* always use the DN_CREATE mask (NT expects file creation always toAndrew Tridgell2000-06-131-8/+3
| | | | cause a notify)
* enable the Linux change notify code and change some notify debug codeAndrew Tridgell2000-06-123-15/+64
|
* totally rewrote the async signal, notification and oplock notificationAndrew Tridgell2000-06-128-465/+647
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handling in Samba. This was needed due to several limitations and races in the previous code - as a side effect the new code is much cleaner :) in summary: - changed sys_select() to avoid a signal/select race condition. It is a rare race but once we have signals doing notification and oplocks it is important. - changed our main processing loop to take advantage of the new sys_select semantics - split the notify code into implementaion dependent and general parts. Added the following structure that defines an implementation: struct cnotify_fns { void * (*register_notify)(connection_struct *conn, char *path, uint32 flags); BOOL (*check_notify)(connection_struct *conn, uint16 vuid, char *path, uint32 flags, void *data, time_t t); void (*remove_notify)(void *data); }; then I wrote two implementations, one using hash/poll (like our old code) and the other using the new Linux kernel change notify. It should be easy to add other change notify implementations by creating a sructure of the above type. - fixed a bug in change notify where we were returning the wrong error code. - rewrote the core change notify code to be much simpler - moved to real-time signals for leases and change notify Amazingly, it all seems to work. I was very surprised!
* fixed comments at top of moduleAndrew Tridgell2000-06-121-2/+3
|
* split all the change notify code out into a separate moduleAndrew Tridgell2000-06-122-392/+427
| | | | | | | | smbd/notify.c. All the data structures are now private to that module. this is in preparation for Linux kernel support for change notify (coming soon to a CVS tree near you)
* a better test for oplocks being enabled in this kernelAndrew Tridgell2000-06-111-1/+18
|
* fixed Linux capabilities handlingAndrew Tridgell2000-06-111-21/+39
| | | | | | I used a trick where CAP_LEASE isn't claimed until it is needed. This means we avoid a system call per setreuid(), and never call capset() unless a user tries to get a oplock on a file that they don't own
* Linux kernel oplocks now seem to work, but need a _lot_ of testingAndrew Tridgell2000-06-115-60/+125
| | | | | I had to modify sys_select() to not loop on EINTR. I added a wrapper called sys_select_intr() which gives the old behaviour.
* a first pass at Linux kernel oplocks supportAndrew Tridgell2000-06-103-15/+207
|
* continued the split of the kernel level oplocks code into a moreAndrew Tridgell2000-06-103-392/+412
| | | | | modular form. In this pass I added oplock_irix.c and added a "struct kernel_oplocks" that describes a kernel oplock implementation.
* (Correct) fix for desired_access being zero in map_share_mode().Jeremy Allison2000-06-091-12/+12
| | | | Jeremy.
* Luke, I am moving the code back into passdb/passdb.c, this the correctJeremy Allison2000-06-092-55/+15
| | | | | | | | | | | | | place to do this, not in smbd/passwd.c Please don't change this without asking first, I have run this past Andrew so talk to him (I'm on vacation next week). I also removed the g_newXXX macros. There are essentially a private C extension, not used anywhere else in the code, and add no functionality over malloc(XX) and make the code harder to understand (everyone knows what malloc does). Jeremy.
* clean up oplock capability code ready for Linux codeAndrew Tridgell2000-06-093-161/+155
|
* split some of the irix kernel oplocks code into a functionAndrew Tridgell2000-06-091-68/+74
|
* free NET_USER_INFO_3 gids when vuser invalidated.Luke Leighton2000-06-091-0/+4
|
* dynamic allocation of NET_USER_INFO_3 gids.Luke Leighton2000-06-091-23/+37
| | | | | | | | | | jeremy, the intent is to call se_access_check() with usr-sid, grp-sid, array-of-group-rids (but array-of-group-sids would do). please do look at smbd/lanman.c's api_NetWkstaGetInfo, it will show you that we really do need to store the entire NET_USER_INFO_3 structure. then again, api_NetWkstaGetInfo is only used by win9x so who cares :)
* reverted jeremy's changes that removed NET_USER_INFO_3. will you pleaseLuke Leighton2000-06-092-29/+56
| | | | not just undercut work in progress, thank you.
* Change from "David S. Chappell" <David.Chappell@mail.cc.trincoll.edu>Jeremy Allison2000-06-081-4/+4
| | | | | | to make "printer driver file" a share parameter. This fits better with the new NT printing subsystem. Jeremy.
* Fix for map_share_mode to allow desired access of zero map to stat open.Jeremy Allison2000-06-081-0/+11
| | | | Jeremy.
* include/smb.h: Removed NET_USER_3 struct from user struct. It doesn't belong ↵Jeremy Allison2000-06-082-56/+29
| | | | | | | | | | | | | there (yet) as there is no infrastructure for it. Replaced it with a dynamic array of group SIDs plus a user. passdb/passdb.c: Added setup_user_sids() function. This is where the lookup should be done, eventually calling winbind. smbd/password.c: Changed to call setup_user_sids(). Removed spurious DEBUG(0) statements. smbd/reply.c: Removed extra parameter to register_vuid(). Jeremy.
* added a NET_USER_INFO_3 struct to user_struct.Luke Leighton2000-06-082-2/+38
| | | | register_vuid fills it with constructed info.
* - changed HAVE_KERNEL_OPLOCKS to HAVE_KERNEL_OPLOCKS_IRIXAndrew Tridgell2000-06-081-14/+14
| | | | - added autoconf test for HAVE_KERNEL_OPLOCKS_LINUX
* Cause printer SD's to be displayed correctly (full control).Jeremy Allison2000-06-081-1/+1
| | | | Jeremy.
* Fixing get/set of security descriptors.Jeremy Allison2000-06-073-1/+8
| | | | | | Removed ugly hack for NT printing. Fixed up tdb parse stuff memory leaks. Jeremy.
* moved secrets fns into secrets.cAndrew Tridgell2000-06-032-2/+2
|
* rpc_client/cli_lsarpc.c: Removed unused variable.Jeremy Allison2000-06-031-9/+9
| | | | | | rpc_server/srv_spoolss_nt.c: Fixed more memory leaks. smbd/nttrans.c: Fixed shadow variable problem. Jeremy.
* param/loadparm.c: Looks like someone ran indent on this !Jeremy Allison2000-06-011-4/+4
| | | | | | | | passdb/smbpass.c: Insure uninitialized memory reference fix. printing/nt_printing.c: rpc_server/srv_spoolss_nt.c: Insure memory leak fixes. smbd/unix_acls.c: Shadow ref fix. Jeremy.
* Getting back to a compilable state (not there yet but close).Jeremy Allison2000-06-011-0/+3
| | | | | | | Added patches for random -> sys_random. Added set_effective_xxx patches for AFS code. Memory allocation changes in spoolss code. Jeremy.
* Changed interface to set_nt_acl slightly.Jeremy Allison2000-05-311-1/+1
| | | | Jeremy.
* Working UNIX -> NT ACL mapper.Jeremy Allison2000-05-311-2/+4
| | | | Jeremy.
* Fixed interface between new ACLS and nttrans code.Jeremy Allison2000-05-312-183/+586
| | | | Jeremy.
* debug output to /tmp.Luke Leighton2000-05-281-1/+1
|
* prs_give_memory in wrong place, also poss. was losing mem.Luke Leighton2000-05-272-7/+34
|
* fixed nttrans.cLuke Leighton2000-05-271-406/+38
|
* Changed MS_DFS to WITH_MSDFS throughout.Shirish Kalele2000-05-263-4/+5
| | | | Fixed trans2 calls on IPC$ to let dfs referral calls through.
* got rid of lp_revalidate()Andrew Tridgell2000-05-241-1/+1
|
* Did a proper fix for the file access on IPC$. Denied all pipe opens onJeremy Allison2000-05-233-126/+202
| | | | | trans2 open calls as we don't have the pipe open response coded up yet. Jeremy.
* Fixed bug where file access was allowed on IPC$ share.Jeremy Allison2000-05-234-5/+11
| | | | | Return correct error codes on invalid share name. Jeremy.
* Added the NETDFS pipe to allow remote administration of the msdfs symlinksShirish Kalele2000-05-181-0/+3
| | | | on the samba server.