summaryrefslogtreecommitdiffstats
path: root/source/include/smb.h
Commit message (Collapse)AuthorAgeFilesLines
* Added code to let NT do a 'delete on close' request on an openJeremy Allison1999-01-211-0/+1
| | | | | | directory handle. WinCenter (multi-user NT system) is doing this. This code still needs testing.... Jeremy.
* smb.h add new FLAG_SHARE to indicate which parameters are usedHerb Lewis1998-12-141-4/+5
| | | | | | | on share page loadparm.c added FLAG_SHARE and FLAG_PRINT to various parameters to tell swat which page these belong to swat.c only print parameters marked on printers and shares pages
* Fixed the modtime bug that Andrej <borsenkow.msk@sni.de> was moaningJeremy Allison1998-11-171-0/+1
| | | | | | | | | about :-). If a client does a modify timestamp on an open file (which will do no good at all on UNIX :-) then keep the modify request pending in the files_struct and apply it at close instead. Jeremy.
* Moved PRINTCAP_NAME into includes to allow it to be tuned perJeremy Allison1998-11-171-4/+0
| | | | | system type. Jeremy.
* Added fixes from HEAD into 2.0 branch.Jeremy Allison1998-11-161-1/+1
| | | | | | | | | | | These are : configure.in: Check for glob.h added. libsmb/namequery.c: Fix for broken parsing of lmhosts. smbd/reply.c: smbd/trans2.c: include/smb.h: Change ROUNDUP to SMB_ROUNDUP. include/includes.h: Fixed include of glob.h Jeremy.
* Makefile.in configure configure.in include/config.h.in: Changes for DGUX and ↵Jeremy Allison1998-11-131-1/+4
| | | | | | | | | | | | | | UNIXWARE. groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf. include/includes.h: Fix YP problem. include/smb.h: Fix ZERO_STRUCTP. lib/util_sock.c: Added strerror() in debugs. passdb/ldap.c: Don't use snprinf, use slprintf. rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf. script/installman.sh: DGUX changes. smbd/open.c smbd/oplock.c: Fixed gcc warnings. web/swat.c: Changes USER to SWAT_USER.
* oops - ZERO_STRUCTP() issues again...Luke Leighton1998-11-131-4/+1
|
* ZERO_STRUCTP does not check argument for NULL.Luke Leighton1998-11-131-1/+4
| | | | ZERO_STRUCTPN _does_ check argument for NULL.
* include/smb.h: Re-added zero pointer protection to ZERO_STRUCTP.Jeremy Allison1998-11-131-3/+1
| | | | | | | lib/util_sock.c: Added strerror() calls to getpeername failures (which seem to be giving IRIX trouble at the moment). rpc_parse/parse_sec.c: Changed use of ZERO_STRUCTPN to ZERO_STRUCTP which again does zero pointer protection. smbd/quotas.c: Fixed typo. Jeremy.
* security descriptorsLuke Leighton1998-11-131-5/+1
|
* security descriptors.Luke Leighton1998-11-121-1/+7
| | | | kanji const char* warnings.
* largely rewrote smbpasswd so that the code is understandable. ThisAndrew Tridgell1998-11-121-1/+1
| | | | | | | | | | | | | should allow us to call a function in swat rather than piping to smbpasswd. while doing this I also fixed quite a few "const char *" versus "char *" issues that cropped up while using const to track down bugs in the code. This led to changes in several generic functions. The smbpasswd changes should be correct but they have not been extensively tested. At least if I have introduced bugs then we should be able to fix them more easily than before.
* include/local.h:Jeremy Allison1998-11-101-0/+25
| | | | | | | | | | | | | include/smb.h: param/loadparm.c: Made GUEST_SESSSETUP run time selectable. Horror of horrors :-). printing/printing.c: Added J.F.'s latest fix. rpc_parse/parse_misc.c: parse_reg.c: rpcclient/cmd_reg.c: rpcclient/display.c: SGI compiler signed/unsigned issues. smbd/reply.c: Made GUEST_SESSSETUP run time selectable. Horror of horrors :-). utils/testparm.c: Added extra test. Jeremy.
* rpcclient registry commands.Luke Leighton1998-11-101-1/+2
|
* added domain and local group structures. names may have to be 256 charsLuke Leighton1998-10-231-0/+60
| | | | long not 128 (fstring) length.
* Reasonably large change to give us *exactly* correct NT delete on close ↵Jeremy Allison1998-10-231-5/+10
| | | | | | | | | | | | | | semantics. This was trickier than it looks :-). Check out the new DELETE_ON_CLOSE flag in the share modes and the new code that iterates through all open files on the same device and inode in files.c and trans2.c Also changed the code that modifies share mode entries to take generic function pointers rather than doing a specific thing so this sort of change should be easier in the future. Jeremy.
* include/smb.h: Added #defines for lots of things - makes our code a *lot* ↵Jeremy Allison1998-10-231-3/+44
| | | | | | | | | | | | | easier to read. lib/util.c: Fixed Luke's set_first_token() function - should return void. smbd/close.c: Move delete_on_close into file_fd_struct structure. smbd/ipc.c: Changed local_machine back to fstring. smbd/nttrans.c: Use defines for mapping share modes. smbd/open.c: Move delete_on_close into file_fd_struct structure, added code for ALLOW_SHARE_DELETE. smbd/reply.c: Use defines for mapping share modes. smbd/trans2.c: Move delete_on_close into file_fd_struct structure. Jeremy.
* the next dialog: user-groups. it's not very sensible what appears, but hey:Luke Leighton1998-10-211-0/+1
| | | | it appears!
* dce/rpcLuke Leighton1998-10-161-1/+2
|
* implemented unix semantics for rename in smbwrapperAndrew Tridgell1998-10-061-0/+1
|
* Got very strict about the differences and uses ofJeremy Allison1998-09-291-17/+18
| | | | | | | 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.
* Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1998-09-281-31/+1
| | | | | | | | | | Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy.
* Makefile.in: Fixed bug with continuation line causing proto to fail.Jeremy Allison1998-09-251-148/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added $(PROGS) $(SPROGS) as targets for make clean. acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES. configure.in: Added sys/capability.h header check. Added function checks for srandom random srand rand. Added HAVE_IRIX_SPECIFIC_CAPABILITIES test. includes.h: Added #include <sys/capability.h>. ntdomain.h: Moved struct acct_info into here from smb.h smb.h: Added KERNEL_OPLOCK_CAPABILITY define. Moved enum action_type into rpcclient.h Moved struct cli_state into client.h Moved struct nt_client_info, struct tar_client_info, struct client_info into rpcclient.h lib/genrand.c: Changed to use sys_random() & friends. lib/smbrun.c: Lose capabilities after fork. lib/system.c: Added set_process_capability(), set_inherited_process_capability() sys_random(), sys_srandom(). lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an 32 bit mounted NFS filesystem. nmbd/nmbd.c: Changed to use sys_random() & friends. nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends. passdb/ldap.c: Missed one pdb_encode_acct_ctrl call. passdb/passdb.c: Changed to Ander's code for ' ' characters. passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ. script/mkproto.awk: Added 'long' to prototypes. smbd/chgpasswd.c: Lose capabilities after fork. smbd/open.c: Do the mmap *after* the kernel oplock. smbd/oplock.c: Removed stub code from kernel oplock path. Added set_process_capability(), set_inherited_process_capability() calls. smbd/reply.c: Initialize count = 0, offset = 0. smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls. tests/summary.c: Ensure we have RANDOM or RAND. utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ. utils/torture.c: Changed to use sys_random() & friends. Jeremy.
* added in samr commands. assistance in returning the missing functions,Luke Leighton1998-09-251-0/+3
| | | | automatically removed because they were "unused", would be appreciated.
* added rpcclient programLuke Leighton1998-09-251-37/+168
|
* Integration of Anders Blomdell <anders.blomdell@control.lth.se>'sJeremy Allison1998-09-241-0/+6
| | | | | | smbpasswd changes. Not exactly the same as his code - several changes. Jeremy.
* First cut at kernel oplocks. This should have no effect unless runninJeremy Allison1998-09-231-4/+22
| | | | | | | | | on a machine that supports them in autoconf. Move various functions out of lib/util.c into smbd/process.c and smbd/oplock.c where they belong. Jeremy.
* add a define for SMB_SEARCH_BITS and change comment on FSTYPE_STRINGAndrew Tridgell1998-09-201-0/+3
|
* configure configure.in: Added checks for statvfs64. Last bit of 64 bit ↵Jeremy Allison1998-09-171-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | widening (I hope :-). include/config.h.in: Added #undef STAT_STATVFS64. include/includes.h: Added SMB_STRUCT_STATVFS type, Changed SMB_BIG_INTEGER to SMB_BIG_UINT and SMB_BIG_INT types. include/smb.h: Added flag defines from CIFS spec. lib/debug.c: Fixed one more mode_t issue. lib/system.c: Added sys_statvfs wrapper. lib/util.c: Changed trim_string to use size_t. param/loadparm.c: Moved "blocking locks" into locking section. Alphabetised locking options. Question - shuld we do this for all options ? passdb/ldap.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT. passdb/nispass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT. passdb/smbpass.c: Changed SMB_BIG_INTEGER to SMB_BIG_UINT. smbd/dfree.c: Changed to use 64 bit types if available. Moved to use unsigned types. smbd/dosmode.c: Fixed one more mode_t issue. smbd/negprot.c: Changed literals to be FLAG_ #defines. smbd/nttrans.c: Removed dead code. smbd/open.c: Changed disk_free call. smbd/process.c: Changed literals to be FLAG_ #defines. smbd/reply.c: Changed disk_free call. smbd/trans2.c: Fixed but in SMB_QUERY_FS_VOLUME_INFO call. Was using UNICODE - should use ascii. tests/summary.c: Added STAT_STATVFS64 check. Jeremy.
* configure configure.in: Added tests for fseek64 and ftell64.Jeremy Allison1998-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | config.h.in: Added fseek64 and ftell64. includes.h: Added definition of SMB_BIG_INTEGER. smb.h: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. access.c: Tidyup of dbug statement. system.c: Added sys_fseek and sys_ftell. Changed mode calls to use mode_t. asyncdns.c: Tidyup of comment. loadparm.c: Tidyup of set_default_server_announce_type() function definition. ldap.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. nispass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpass.c: Changed (*getsmbpwpos) and (*setsmbpwpos) to use SMB_BIG_INTEGER. smbpassfile.c: Use sys_fseek(). chgpasswd.c: Tidyup of debug statement. dosmode.c: Changed mode calls to use mode_t. ipc.c: Removal of dead code. nttrans.c: Changed mode calls to use mode_t. open.c: Changed mode calls to use mode_t. pipes.c: Removal of dead code. reply.c: Removal of dead code. trans2.c: Removal of dead code. Changed mode calls to use mode_t. Jeremy.
* Fixed problems people were having with creating profileJeremy Allison1998-09-141-0/+10
| | | | | | | | | directories (NTTrans/Create with Security Descriptor for a directory). It turns out the CIFS spec is bogus (what a suprise) and the 'is a directory' flag is actually embedded in the create_options field. Jeremy.
* Ok - this is the 'expose 64 bit to the clients' checkin.Jeremy Allison1998-09-111-0/+1
| | | | | | | | | | I have tested it by creating a 'holey' 20GB file - checking that it shows up correctl in the NT file view (it does) and am busily copying it to NULL: on the NT box. All good so far.... :-). Also implemented NT 'delete on close' semantics. Jeremy.
* Added ssize_t to configure code.Jeremy Allison1998-09-111-1/+5
| | | | | | | | | | | Got 'religion' about using size_t and ssize_t for read/write stuff as part of the code to expose 64 bits to the client. This checkin does all the 'easy' stuff - such as all the read/write/lock calls - but now comes the harder parts (open & friends) and all the file enquiry functions..... Jeremy.
* smb.h: Removed fdnum from file_fd_struct. Not needed.Jeremy Allison1998-09-101-1/+0
| | | | | | | files.c: Removed fd bitmap - not needed. Added code to do use arrays rather than linked list - disabled by default but can be enabled to check performance. Jeremy.
* Ok - this is the 64 bit widening check in. It changes the configureJeremy Allison1998-09-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | to check for stat64 and friends, and then changes much of Samba to use the data type SMB_OFF_T for file size information. stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide the 64 bit calls if needed. Note that this still does not expose 64 bit functionality to the client, as the changes to the reply_xxx smb's are not yet done. This code change should make these changes possible. Still to do before full 64 bit-ness to the client: fcntl lock code. statfs code widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T types being in place). Let me know if wierd things happen after this check-in and I'll fix them :-). Jeremy.
* configure.in, configure: include/config.h.in: Added stropts and poll.Jeremy Allison1998-08-311-41/+12
| | | | | | | | | | | include/smb.h: Moved old typedefs of uint8 etc. into include/includes.h where all the other defines live (changed them from typedefs to defines). Other changes : changed from using uint32 to SMB_DEV_T and SMB_INO_T in preparation for moving to size independed (ie. 64 bit clean) device and inode access. Stat call wrapper comes next :-). Jeremy.
* changed the size of a char array in the userdata_struct from 1 to 16Andrew Tridgell1998-08-301-0/+9
| | | | | | | | | | | | to account for padding/alignment issues. Eventually I'd like to find a way to get rid of this construct altogether as it is a bit error prone and hard to debug. also added a new macro: ZERO_STRUCTP() that takes a pointer to a structure and zeros the structure. Used in nmbd to zero allocated structures before freeing them to try to catch bugs a bit faster.
* This is the stat cache code - seems to work fine (needs heavyJeremy Allison1998-08-271-0/+8
| | | | | | NetBench testing though.... :-). Attempts to efficiently reduce the number of stat() calls Samba does. Jeremy.
* use a separate ZERO_ARRAY() macro instead of ZERO_STRUCT() forAndrew Tridgell1998-08-261-0/+1
| | | | arrays. This prevents (harmless) warnings from some compilers
* changed the default permissions code to do this:Andrew Tridgell1998-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | if ((sbuf->st_mode & S_IWUSR) == 0) result |= aRONLY; rather than the very complex user/group permissions checks we do currently. This is equivalent ot setting "alternate permissions = yes" in the old code. The change is motivated by three main reasons: 1) it's basically impossible to second guess whether a file is writeable without trying to open it for writing. ACLs, root squash etc just make it too hard. 2) setting it not RONLY if the owner can write is closer to what NT does (eg. look at a cdrom - files are not marked read only). 3) it prevents the silly problem of copying files from a read only share to a writeable share and then finding you can't write to them as windows preserves the RONLY flag. Lots of people get bitten by this when they drag a folder from a Samba drive. It also hurts some install programs. I have also added a new flag type for loadparm.c called FLAG_DEPRECATED which I've set for "alternate permissions". I'll soon add code to testparm to give a warning about deprecated options.
* Changed ASSERT macros to SMB_ASSERT macros as some systems alreadyJeremy Allison1998-08-241-2/+2
| | | | | have an ASSERT macro defined. Jeremy.
* added ASSERT() and ASSERT_ARRAY() macros and sprinkled them liberallyAndrew Tridgell1998-08-221-0/+4
| | | | in the rpc code.
* added new smb.conf option "panic action". see my samba-technicalAndrew Tridgell1998-08-211-4/+0
| | | | explanation.
* added a macro ZERO_STRUCT() which is useful for initialisingAndrew Tridgell1998-08-211-0/+3
| | | | structures declared on the stack.
* now that we have no global arrays we can start to split up the monsterAndrew Tridgell1998-08-171-0/+7
| | | | | | | server.c without breaking things. this splits off netprot.c and fileio.c for negprot and read/write/seek handling respectively.
* moved connection_struct handling code into smbd/conn.c and changed itAndrew Tridgell1998-08-171-4/+3
| | | | to a linked list with bitmap format.
* much cleaner chain pointer handling for both files and pipes.Andrew Tridgell1998-08-171-5/+0
| | | | | | the chain pointer is now stored as a static and is set whenever a handle is created or extracted. This also makes the code less error prone.
* got rid of the Files[] array completely (previously I'd just made itAndrew Tridgell1998-08-161-1/+0
| | | | | | | | | | | | | | | | | private to files.c) It now is a doubly linked list with a bitmap for allocated file numbers. Similarly for the fd_ptr code. I also changed the default maximum number of open files to 4096. The static cost is 1 bit per file. It all seems to work, and it passes the "does Sue scream" test, but if you see weird behaviour then please investigate. With the volume of new code that has gone in there are bound to be one or two bugs lurking. note that you must do a "make clean" before building this as many data structures have changed in size.
* server.c: fixed a bug in close_file() with the new files.c handling codeAndrew Tridgell1998-08-161-11/+18
| | | | | bitmap.c: added bitmap hanlding code in preparation for increasing the default max open files to several thousand
* this checkin gets rid of the global Files[] array and makes it localAndrew Tridgell1998-08-151-17/+20
| | | | | | | in files.c it should now be faily easy to expand the default MAX_OPEN_FILES to many thousands.