summaryrefslogtreecommitdiffstats
path: root/source/include/smb.h
Commit message (Collapse)AuthorAgeFilesLines
* Win32 API is explicit that EnumPrinterData returns ERROR_MORE_DATA notJeremy Allison2000-09-081-0/+1
| | | | | | ERROR_INSUFICIENT_BUFFER when working out what space is needed. This fix gives us the same return that WinNT does. Jeremy.
* Documentation on NT_USER_TOKEN. Requested by Sander.Jeremy Allison2000-08-231-0/+5
| | | | Jeremy.
* Tidied up security rights definitions.Jeremy Allison2000-08-101-7/+8
| | | | Jeremy.
* Added an NT_USER_TOKEN structure that is copied/passed around associatedJeremy Allison2000-08-031-1/+11
| | | | | | | 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-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* A rather big change set ! (listed in no particular order)Jean-François Micouleau2000-07-251-0/+2
| | | | | | | | | | | | | | | | | | | | | - changed the default forms flag to 2 - all short architecture name are uppercased - get_short_archi() is now case unsensitive - the drivers TDB is indexed by archi/version/name - implemented code to move drivers from the upload area to the download area. Someone else need to look at that code. - don't return anymore a default driver if it doesn't exist in the TDB. Instead return an error. - cleaned prs_unistr. - #ifdef out jeremy's new SD parsing in printer_info_2 - removed the unused MANGLE_CODE - #ifdef out the security checking in update_printer() as it doesn't work for me. Zap your ntdrivers.tdb, it won't work anymore. J.F.
* reverted a some previous additions.Gerald Carter2000-07-151-15/+4
| | | | | | | Removed msrpc_local struct --jerry
* don't need shmem any moreAndrew Tridgell2000-07-061-29/+0
|
* Some more sec_ctx changes. Modified some fields in the pipe_structTim Potter2000-07-031-4/+5
| | | | | structure so authenticated pipe users can have their unix groups set when become_authenticated_pipe_user() is called.
* first pass at merging rpcclient from TNG to HEAD. You can get aGerald Carter2000-07-031-0/+35
| | | | | | | | | | | | | | semi-connection and a rpcclient prompt, but no functionality there yet. Will be a few more days on that. The changes to the header files were minor. A few struct's and a few additional fields to existing ones. No deletions. **minimal change necessary** :-) Well, maybe not minimal, but I tried. All other programs compile, link and run ok from what I can tell so I don;t think I broke anything. --jerry
* A neater way of solving the S_ISSOCK, S_ISFIFO problem.Tim Potter2000-06-211-47/+0
| | | | Moved the S_* macros from smb.h to includes.h
* #include nsswitch/winbind_nss.hTim Potter2000-06-141-0/+2
|
* allow the notify implementation to choose the select timeout changeAndrew Tridgell2000-06-141-0/+1
|
* fixed the change notify bit definitionsAndrew Tridgell2000-06-131-1/+2
|
* totally rewrote the async signal, notification and oplock notificationAndrew Tridgell2000-06-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* a first pass at Linux kernel oplocks supportAndrew Tridgell2000-06-101-4/+1
|
* continued the split of the kernel level oplocks code into a moreAndrew Tridgell2000-06-101-1/+13
| | | | | modular form. In this pass I added oplock_irix.c and added a "struct kernel_oplocks" that describes a kernel oplock implementation.
* Luke, I am moving the code back into passdb/passdb.c, this the correctJeremy Allison2000-06-091-1/+6
| | | | | | | | | | | | | 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.
* reverted jeremy's changes that removed NET_USER_INFO_3. will you pleaseLuke Leighton2000-06-091-2/+1
| | | | not just undercut work in progress, thank you.
* include/smb.h: Removed NET_USER_3 struct from user struct. It doesn't belong ↵Jeremy Allison2000-06-081-1/+2
| | | | | | | | | | | | | 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-081-18/+20
| | | | register_vuid fills it with constructed info.
* - changed HAVE_KERNEL_OPLOCKS to HAVE_KERNEL_OPLOCKS_IRIXAndrew Tridgell2000-06-081-2/+2
| | | | - added autoconf test for HAVE_KERNEL_OPLOCKS_LINUX
* lp_server_role() + use in srv_reg.Luke Leighton2000-05-281-0/+10
|
* security descs in spoolss. needs parse_sec.c nttrans.c broken.Luke Leighton2000-05-271-1/+2
|
* Added the NETDFS pipe to allow remote administration of the msdfs symlinksShirish Kalele2000-05-181-0/+1
| | | | on the samba server.
* - use full_name instead of real_nameAndrew Tridgell2000-05-041-1/+1
| | | | - got rid of guest map code in lpq parser
* split the username in the vuser structure into a separateAndrew Tridgell2000-05-021-3/+8
| | | | | | | | userdom_struct. As the name implies this also contains a domain (unused at the moment). This will be important shortly, as operation in appliance mode needs the domain to be always carried with the username.
* Ok - this is the *third* implementation of this (third time's the charm :-).Jeremy Allison2000-04-281-13/+0
| | | | | | | | | | | | | | | | | This implementation keeps all POSIX lock records in a separate in memory tdb database only known about in locking/posix.c. In addition, the pending close fd's are also held in a tdb which has an array of fd's indexed by device and inode. The walk-split code uglyness has been moved to posix.c from brlock.c, which is the only place that needs to know about it, and the extra functions hacked into brlock to expose internal state have been removed. This implementation passes smbtorture locktest4, the only thing I need to check now for completeness is what to do about lock upgrade/downgrades which Win32 allows under some *very* strange circumstances. Jeremy.
* Added info level 1005 to netsharegetinfo (is the share a DFS root)Shirish Kalele2000-04-281-0/+1
| | | | Added dfs_server announcement in set_default_server_announce_type()
* Ok - this is more subtle than it looks :-).Jeremy Allison2000-04-271-1/+1
| | | | | | | | | | | | | | | When a file is being closed, once it passes the fnum and tid tests then the locking context should be ignored when removing all locks. This is what is done in the brl close case, but when you have outstanding POSIX locks, then you cannot remove all the brl locks in one go, you have to get the lock list and call do_unlock individually. As this uses global_smbpid as the locking context, you need to make sure that this is set correctly for the specific lock being removed. I now do this by storing the smbpid in each entry in the unlock list returned from the query call. I removed the smbpid from fsp (not needed) and things seem ok (even with the stupid smbpid tricks that smbtorture plays :-). Jeremy.
* Fixed subtle unlocking bug when a file is closed. We need to store theJeremy Allison2000-04-271-0/+1
| | | | | | | | smbpid used when a file was opened in the files_struct. Else we use the wrong global_smbpid when we are closing the file and trying to remove the brl locks - this causes the brl locks to be left when the file is closed as the samba_context check fails. Jeremy.
* Did the rewrite Andrew wanted where all knowledge of POSIX locking isJeremy Allison2000-04-271-3/+0
| | | | | | | | | | removed from the smbd/open.c code. We now use a dlink list of structures indexed by dev/inode to store all pending fd's for close. This could be rewritten to use lib/hash.c if this is discovered to be too slow in use. Andrew, please take a look and let me know if this is what you had in mind. Jeremy.
* Fixed crash bugs Andrew pointed out with LOCK4 smbtortureJeremy Allison2000-04-271-1/+1
| | | | | | | test. Was miscounting posix locks, plus was not taking into account the case where other_fsp == fsp in the 'move locks' case. DOH ! This code will be re-written anyway :-). Jeremy.
* Added the hard code :-).Jeremy Allison2000-04-251-0/+12
| | | | | | | | | | HEAD should now map brl locks correctly into POSIX locks, including the really nasty case of large range unlock. There is a lot of pretty ASCII art in locking/brlock.c explaining exactly how this code works. If it is unclear, please ask me. Jeremy.
* Added the code that keeps fd's open across a close if there are other fsp'sJeremy Allison2000-04-241-0/+2
| | | | | | | | | | | | | | | open on the same dev/inode pair with existing POSIX locks. This is done at the smbd/open layer, so smbd just calls fd_close() and the transfer of any open fd's is done under the covers of fd_close(). When an fsp is closed and no other fsp's open on the same dev/inode pair have existing POSIX locks then all fd's associated with this fsp are closed. Now only the hard part of doing the POSIX range unlock code when read locks overlap remains for full POSIX/SMB lock integration.... Jeremy.
* Now that fsp's are created on successful file open, the structure memberJeremy Allison2000-04-241-1/+0
| | | | | | | | | | | | fsp->open is no longer needed (if an fsp pointer is valid, then it's open :-). NB for Luke, this patch also did not apply to TNG. TNG is not yet identical w.r.t file serving with HEAD. This makes it impossible for me to help maintain TNG. Please fix asap. lib/substitute.c: Removed unused variable (pidstr). Jeremy.
* added fdprintf()Andrew Tridgell2000-04-161-0/+10
| | | | | | | this is like fprintf() but operates on a file descriptor combined with file_load_lines() this makes it really easy to get rid of the use of fopen() in Samba.
* the fsp needs a jobid in it nowAndrew Tridgell2000-04-161-2/+3
| | | | | | | | | | | | | | | | | | | | | ------------ The following series of commits are for the new tdb based printing backend. This completely replaces our old printing backend. Major changes include: - all print ops are now done in printing/*.c rather than scattered all over the place - system job ids are decoupled from SMB job ids - the lpq parsers don't need to be nearly so smart, they only need to parse the filename, the status and system job id - we can store lots more info about a job, including the full job name - the queue cache control is much better I also added a new utility routine file_lines_load() that loads a text file and parses it into lines. This is used in out lpq parsing and I also want to use it to replace all of our fgets() based code in other places.
* Code to map tdb locks onto POSIX. Mainly placeholder code at the moment,Jeremy Allison2000-04-121-4/+5
| | | | | | but the structure is done enough so that Andrew can look it over and give a yea/nay decision. Jeremy.
* got rid of the file_fd_struct structure completely.Andrew Tridgell2000-04-101-22/+4
| | | | | | | | | With the new br_lock() code we no longer need the fd multiplexing, which is great because it was really horrible :) Moved the dev, inode and delete_on_close elements into the fsp. A nice side effect is that this has greatly simplified open.c
* changed all the status code to ERROR_xxx instead of NT_STATUS_xx which areJean-François Micouleau2000-04-051-0/+3
| | | | | | | | | | | | wrong in the spoolss case. fxed a bug in the job notify code (that's the polite answer), the truth is different: there is a bug in the NT spooler service, including SP6a and NT2K. changed the default lpcommand in the LPRNG case. J.F.
* include/smb.h:Jeremy Allison2000-03-131-0/+3
| | | | | | | | smbd/negprot.c: smbd/reply.c: Fixes to recognise Win2k. param/loadparm.c: Put debug timestamp parameter back to correct default. smbd/nttrans.c: Fix to detect Win2k unicode bug with transact create. Jeremy.
* oops ! forgot smb.h in last commitJean-François Micouleau2000-03-131-0/+1
| | | | | | added info level 1 parsing code for addprinter(ex) J.F.
* Fixups for compiles with gcc flags -Wall -Wshadow -Wstrict-prototypes ↵Jeremy Allison2000-03-101-30/+3
| | | | | | | -Wpointer-arith -Wcast-qual Partially implemented rpc daemon redirect (needs more work). Jeremy.
* you know, when you do a cvs commit, you _really_ expect it to actually work.Luke Leighton2000-03-101-22/+29
| | | | this explains why j-f wasn't happy.
* getprinter level 0: was to short, found most of the fields, undocumented,Jean-François Micouleau2000-03-101-3/+12
| | | | | | | | | undecoded, nothing in MSDN, but now it works :-) cleanup of error codes. fixed some dfs declarations function. J.F.
* Big update moving the multi-pdu support from 2.0.x into HEAD for JFJeremy Allison2000-03-091-0/+4
| | | | | | | | | | | | and the printer functions. Also tidied up some header includes and got the order right so you can now do a : make proto make clean make Jeremy.
* dded Microsoft Dfs services.Shirish Kalele2000-03-081-0/+1
| | | | | | | | | | | | | | | | | * added a new msdfs/ directory under source/ * added msdfs sources under this directory. * modified configure setup to add a --with-msdfs configure time option Modified Files: Makefile.in acconfig.h configure configure.in include/config.h.in include/includes.h include/proto.h include/smb.h include/smb_macros.h param/loadparm.c smbd/negprot.c smbd/nttrans.c smbd/process.c smbd/reply.c smbd/server.c smbd/trans2.c Added Files: include/msdfs.h msdfs/README msdfs/msdfs.c msdfs/msdfs_tdb.c msdfs/parse_dfs_map.c ----------------------------------------------------------------------
* client/client.c:Jeremy Allison2000-02-251-0/+12
| | | | | | | libsmb/clientgen.c: Fixes for Win2k smbclient browsing. Other fixes implement smbpasswd -x user to delete users. Also allows swat to do the same. Jeremy.
* Fix for reporting file system attributes correctly.Jeremy Allison2000-02-181-4/+11
| | | | Jeremy.