summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
AgeCommit message (Collapse)AuthorFilesLines
1999-07-15more dfs stuff. this looks like it's going to be more appropriate to useLuke Leighton1-7/+35
the vfs tables. at the moment, i replaced all calls to unix_convert() with unix_dfs_convert(). this does the job, but it's not very nice. (This used to be commit 00d4aebce9f268a737ef9df9bdbe59f8fe831979)
1999-07-15dfs issuesLuke Leighton1-1/+1
(This used to be commit d9ada8b55d539e555d25298e0a308ea952e2807e)
1999-07-13dfs parsed string length was being set explicitly to value "6", overwritingLuke Leighton1-22/+21
the correct length. (This used to be commit 5d1fad53c2bdfef63930e0b9d5cc460c9740066e)
1999-07-12Jean-Francois Micouleau's rewritten DFS patch, originally written byLuke Leighton1-66/+332
Nigel Williams. despite the data format being *exactly* the same as NT's, this still doesn't work yet. more work needed. (This used to be commit 270981960bb5aab52d2f8e494827101ece6729c4)
1999-04-04Use VFS operations for file I/O.Tim Potter1-14/+19
(This used to be commit cfddbdb62485256a947a30e04c753200451cbe1c)
1999-02-15Always null-terminate strings.Matthew Chapman1-3/+3
Also some string length and sizeof(pointer) corrections. (This used to be commit ce24191939b82985d09eabe945199f38b0fea486)
1999-02-12UNICODE cleanup (see lib/util_unistr.c).Matthew Chapman1-6/+7
No more ugly static library buffers and all functions take a destination string length (especially unistrcpy was rather dangerous; we were only saved by the fact that datagrams are limited in size). (This used to be commit a1d39af1ce1d451b811dbd7c2ba391214851b87e)
1998-11-23Fixed -Wall -Wshadow warning.Jeremy Allison1-2/+1
Jeremy. (This used to be commit 81b90208910528a4ace683f30e39c54d8cfa12b7)
1998-11-19Sync up with 2.0 code.Jeremy Allison1-2/+1
Added HPUX autoconf changes. Added "gross hack" printer code. Jeremy. (This used to be commit 1ef6d3bd63722afe9c376793a6ea72046d1a0602)
1998-11-18Fixed crash bug which was assuming that fd_ptr was always non-nullJeremy Allison1-3/+6
(which is not the case with open directories). Jeremy. (This used to be commit c154b1601f5891d664fc538ec8874fa8ef2061e6)
1998-11-17Fixed NT modify timestamp issue.Jeremy Allison1-2/+15
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. (This used to be commit 92a7a86f0e0255e3812dd35bebfcd653091514ae)
1998-11-15change ROUNDUP to SMB_ROUNDUP to prevent conflicts with system macrosAndrew Tridgell1-6/+6
(This used to be commit d9d44d98ec719b7fc6d5b0fc35bf8727f4cd0372)
1998-10-26Fixed a couple of issues with the SMB_QUERY_FILE_ALL_INFO query.Jeremy Allison1-2/+5
Ensured offset was being reported correctly for 64 bit file access, ensured delete on close bit was being reported correctly. Jeremy. (This used to be commit 4332bc06c6604a3e14007eda4f40e6183a1f8526)
1998-10-24volker was concerned about unique inode numbers and smbsh. This set ofAndrew Tridgell1-0/+1
changes uses the unique index number from a SMB_QUERY_FILE_ALL_INFO to try to provide inode numbers. If it is 0 then use the hash of the filename as before. (This used to be commit 2565ccf9de9d5e80fdb5bcadbc7130faba386d95)
1998-10-23Handle the case where multiple smbd have the file open, some of whomJeremy Allison1-15/+65
don't have the ALLOW_DELETE_ON_CLOSE share flag enabled. Told you this was fiddly code :-). Jeremy. (This used to be commit 222d686a6cdbc2947e7201636ae80ef4c650a65d)
1998-10-23Make the new code conditional on lp_share_modes() just like the code in ↵Jeremy Allison1-36/+39
open_file_shared(). Jeremy. (This used to be commit 8de02620ea8f45f6a700617911947467e7be46e1)
1998-10-23Fixed debug reporting in the changed code.Jeremy Allison1-1/+6
Jeremy. (This used to be commit d815e2d7a65c95ae71372b4fc8fe82f0202386dc)
1998-10-23Fixed bug in previous commit where I was overwriting share_mode fromJeremy Allison1-3/+4
one fsp with that of another. Not good :-). Jeremy. (This used to be commit 269bca2b3bbf5cae9fdf05d0405bfd80272da5d1)
1998-10-23Reasonably large change to give us *exactly* correct NT delete on close ↵Jeremy Allison1-1/+51
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. (This used to be commit 5e6a7cd99d29d1cf068fc517272559c1cf47ea3a)
1998-10-23include/smb.h: Added #defines for lots of things - makes our code a *lot* ↵Jeremy Allison1-7/+4
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. (This used to be commit 8e1ce307bd6a9056b4a95fe6f52ff42dc6e03a08)
1998-10-21Fixed mainly signed/unsigned issues found by SGI cc in -fullwarn mode.Jeremy Allison1-7/+29
smbd/chgpasswd.c: Fixed (my) stupid bug where I was returning stack based variables. Doh ! smbd/trans2.c: Allows SETFILEINFO as well as QFILEINFO on directory handles. Jeremy. (This used to be commit 0b44d27d0b5cc3948a6c2d78370ccddf1a84cd80)
1998-10-20smbd/nttrans.c smbd/trans2.c: First fixes for NT5.0beta2. That redirectorJeremy Allison1-11/+32
has some *horrible* bugs ! smbwrapper/shared.c smbwrapper/smbsh.c smbwrapper/smbw.c: Fixed gcc warnings. Jeremy. (This used to be commit 76448d1d82a78520953c662afee0886122ce134b)
1998-10-18Fixed sys_lseek and seek_file calls so all returnsJeremy Allison1-1/+2
are *checked* :-). Jeremy. (This used to be commit b8b781191dd7d28944d87eec5fa0fbef798e289b)
1998-10-16only do the MAC extensions if we are a NTFS filesystemAndrew Tridgell1-6/+10
(This used to be commit 91d224735d1a4ef26d75d87e3b35d8d156b8998b)
1998-10-16trans2.h: Added Thursby MAC extension.Jeremy Allison1-0/+7
smbd/trans2.c: Added Thursby MAX extension. libsmb/clientgen.c: Fixed smbtorture lock code. Jeremy. (This used to be commit 514e52e4b4d6c7db7ebe2265e60c77b4f18d11b3)
1998-10-05fixed some cast warnings from "cc -64" on IRIXAndrew Tridgell1-4/+4
(This used to be commit 624097e8f4a104393865ee100e884f000ca3f6df)
1998-10-04added support for printing via smbwrapperAndrew Tridgell1-7/+7
You can print using "cp filename /smb/SERVER/PRINTER/jobname" You can list the current printqueue using ls (This used to be commit 080fb61b69620e26e8122705383dc2bd0468a519)
1998-09-28Fixed problems found in lint pass over the old code by <cpeterso@microsoft.com>.Jeremy Allison1-0/+4
These were the problems that still existed in the 2.0 branch. Jeremy. (This used to be commit 3fd28812f75f2311a114ff905143634e3bbb1fac)
1998-09-23First cut at kernel oplocks. This should have no effect unless runninJeremy Allison1-3/+1
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. (This used to be commit c3c5e13f85c97939746070132dad941e79c546fb)
1998-09-23look at the CAP_NT_SMBS bit in the client capabilities to determine ifAndrew Tridgell1-15/+20
we should serve up volume labels as ascii or unicode. NT wants ascii, W95 wants unicode. It's a crazy protocol! (This used to be commit 24b8a757ae2899d54dd2b2f091a3c0de6de84dbb)
1998-09-203 changes:Andrew Tridgell1-9/+12
1) use lp_fstype() instead of FSTYPE_STRING 2) added SMB_SEARCH_BITS to the TconX reply options (in vwv3). I noted that NT sets this (undocumented) bit and setting it helped get autorun from exported cdroms working. 3) fixed volume labels in QFSINFO level 258. I made these changes while getting the Encyclopadia Brittanica CD to run from a Samba drive. (I bought it for Sue yesterday). The first and second changes allowed Samba to export CDs with autorun info and the client will autorun it when mounted. There are all sorts of nasty implications in that that perhaps we can go into on samba-technical. Think about creating some autorun info in /tmp/ then waiting for people to mount it as scratch space ... The last change was because EB wanted the right volume label. The code we had used a non unicode volume label but tests with W95->NT4 showed that it has to be unicode. There was a note in the code from Jeremy saying that he thought it should _not_ be unicode. Jeremy, can you explain why? It certainly didn't work as non-unicode (the client displays a garbage volume label) and when I fixed it to use unicode it all worked from Win95. and in case anyone is interested EB98 now works fine from a Samba drive :) (This used to be commit 66268ae5881f43fbdc1ccd751122ab2285c375ad)
1998-09-18gto ri of a bunch more #ifdef LARGE_SMB_OFF_T checks by introducing aAndrew Tridgell1-34/+11
SOFF_T() macro for setting an SMB_OFF_T variable also limited mmap based reads to MAX_MMAP_SIZE. We really can't mmap 2^50 bytes due to virtual address space problems. (This used to be commit 4e784b18899eddd2399a51fa7d8c219560432922)
1998-09-17configure configure.in: Added checks for statvfs64. Last bit of 64 bit ↵Jeremy Allison1-7/+16
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. (This used to be commit c512b1b91fb7f2a7a93b9033a33e06d966daadb4)
1998-09-17configure configure.in: Added tests for fseek64 and ftell64.Jeremy Allison1-5/+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. (This used to be commit c381d32e3dc23fe887408016cae821aceb30da2c)
1998-09-11Ok - this is the 'expose 64 bit to the clients' checkin.Jeremy Allison1-20/+70
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. (This used to be commit 1654faee80648583e6a47ab7eda990fefdf85124)
1998-09-05ahh, the joy of deleting large chunks of code that someone else hasAndrew Tridgell1-4/+0
painstakingly put in :) This gets rid of most of the #ifdef LARGE_SMB_INO_T ifdefs around DEBUG() statements. We just use %.0f in all cases. Makes the code a bit easier to read :) (This used to be commit 41f0069afc02169932e04ff0039bb6328eaaf04d)
1998-09-05tridge the destroyer returns!Andrew Tridgell1-1/+1
prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static? (This used to be commit 2204475c87f3024ea8fd1fbd7385b2def617a46f)
1998-09-03Ok - this is the 64 bit widening check in. It changes the configureJeremy Allison1-97/+104
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. (This used to be commit 14500936c321d15995c963766aac67bf1f4e3824)
1998-09-01More abstraction of file system data types, to move to a 64Jeremy Allison1-12/+12
bit file interface for the NT SMB's. Created a new define, SMB_STRUCT_STAT that currently is defined to be struct stat - this wil change to a user defined type containing 64 bit info when the correct wrappers are written for 64 bit stat(), fstat() and lstat() calls. Also changed all sys_xxxx() calls that were previously just wrappers to the same call prefixed by a dos_to_unix() call into dos_xxxx() calls. This makes it explicit when a pathname translation is being done, and when it is not. Now, all sys_xxx() calls are meant to be wrappers to mask OS differences, and not silently converting filenames on the fly. Jeremy. (This used to be commit 28aa182dbffaa4ffd86047e608400de4b26e80eb)
1998-08-31configure.in, configure: include/config.h.in: Added stropts and poll.Jeremy Allison1-1/+4
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. (This used to be commit 3d9ec96de5e04e83abafe9c5d980bd39eee856ea)
1998-08-27This is the stat cache code - seems to work fine (needs heavyJeremy Allison1-7/+7
NetBench testing though.... :-). Attempts to efficiently reduce the number of stat() calls Samba does. Jeremy. (This used to be commit d0e48a2d8072c3e77a57ac6a2fb5044c05f03b41)
1998-08-25Added code to (correctly) ignore TRANSACT2_SETFILEINFO with ↵Jeremy Allison1-1/+3
SMB_SET_FILE_ALLOCATION_INFO. Office 97 expects this call to succeed when you tell it you do NT SMB calls. Jeremy. (This used to be commit 260e7e27401d863e9f580d4748c577334d9fc9d0)
1998-08-21don't attempt to answer QFILEINFO/SMB_QUERY_FILE_STREAM_INFO queries -Andrew Tridgell1-0/+4
if we do then NTws gets a BSOD. I checked and NT server refuses these queries too :) (This used to be commit d2fb7ee8f55dd1ff25fca46e18b02a05bc2b71ae)
1998-08-21fixed a bug in trans2_qfilepathinfo() where we used the length of theAndrew Tridgell1-0/+4
basename of a file but the whole file name. silly error. (This used to be commit 6e00de7a1d3d5f9fa9bcc40db119fcb8602165c9)
1998-08-17much cleaner chain pointer handling for both files and pipes.Andrew Tridgell1-3/+2
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. (This used to be commit 068a862982bea726e8d7b1b4065d510b9840a272)
1998-08-16changed find_free_file() to file_new().Andrew Tridgell1-1/+1
(This used to be commit 3daee29636dcb2d99a0e7c08179a098befae00dc)
1998-08-15this checkin gets rid of the global Files[] array and makes it localAndrew Tridgell1-24/+21
in files.c it should now be faily easy to expand the default MAX_OPEN_FILES to many thousands. (This used to be commit b088c804f98908eb02f05ab2f2e8a61691a0a582)
1998-08-15configure: Changes for extra headers.Jeremy Allison1-4/+6
configure.in: Source for header changes. client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile. include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers. include/includes.h: Headers for the above. include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int). lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/debug.c: Fixed signal functs. lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile. libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem_sysv.c: Fixed error messages in sysV stuff. nmbd/asyncdns.c: Fixed signal functs. nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/nttrans.c: Fixed fsp code path. smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem. smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/trans2.c: Fixed core dump bug. smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile. Jeremy. (This used to be commit 1b9cbcd02e575dc0a95fa589f720df30a4acc46b)
1998-08-14this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1-287/+322
Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep. (This used to be commit c7ee025ead4a85b6fa44a832047b878451845fb6)
1998-08-11include/smb.h: Removed dir_ptr. Not needed.Jeremy Allison1-4/+4
locking/locking.c: First cut a blocking lock code. #ifdef'ed out for now. locking/locking_shm.c: Removed dir_ptr. Not needed. smbd/nttrans.c: More work on ChangeNotify - return is not an error and needs to be handled as a nttrans with zero params. Removed dir_ptr. Not needed. smbd/reply.c: smbd/server.c: smbd/trans2.c: Removed dir_ptr. Not needed. Hmmm. At the moment smbclient is broken - doesn't issue prompt correctly. This needs looking at. Jeremy. (This used to be commit ddfbcc05815621d3c463f92faed047f126412342)