summaryrefslogtreecommitdiff
path: root/source3/torture/cmd_vfs.c
AgeCommit message (Collapse)AuthorFilesLines
2009-07-06s3: Plumb smb_filename through SMB_VFS_NTIMESTim Prouty1-1/+13
2009-07-06s3: Plumb smb_filename through SMB_VFS_UNLINKTim Prouty1-1/+11
2009-07-06s3: Plumb smb_filename through SMB_VFS_RENAMETim Prouty1-1/+20
2009-06-24s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTATTim Prouty1-2/+24
This patch introduces two new temporary helper functions vfs_stat_smb_fname and vfs_lstat_smb_fname. They basically allowed me to call the new smb_filename version of stat, while avoiding plumbing it through callers that are still too inconvenient. As the conversion moves along, I will be able to remove callers of this, with the goal being to remove all callers. There was also a bug in create_synthetic_smb_fname_split (also a temporary utility function) that caused it to incorrectly handle filenames with ':'s in them when in posix mode. This is now fixed.
2009-06-17s3: Change SMB_VFS_OPEN to take an smb_filename structTim Prouty1-1/+12
This was a little messy because of all of the vfs modules I had to touch. Most of them were pretty straight forward, but the streams modules required a little attention to handle smb_filename. Since the use of smb_filename enables the vfs modules to access the raw, over-the-wire stream, a little bit of the handling that was being done by split_ntfs_stream_name has now been shifted into the individual stream modules. It may be a little more code, but overall it gives more flexibility to the streams modules, while also allowing correct stream handling.
2009-05-26Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke1-82/+98
This patch introduces struct stat_ex { dev_t st_ex_dev; ino_t st_ex_ino; mode_t st_ex_mode; nlink_t st_ex_nlink; uid_t st_ex_uid; gid_t st_ex_gid; dev_t st_ex_rdev; off_t st_ex_size; struct timespec st_ex_atime; struct timespec st_ex_mtime; struct timespec st_ex_ctime; struct timespec st_ex_btime; /* birthtime */ blksize_t st_ex_blksize; blkcnt_t st_ex_blocks; }; typedef struct stat_ex SMB_STRUCT_STAT; It is really large because due to the friendly libc headers playing macro tricks with fields like st_ino, so I renamed them to st_ex_xxx. Why this change? To support birthtime, we already have quite a few #ifdef's at places where it does not really belong. With a stat struct that we control, we can consolidate the nanosecond timestamps and the birthtime deep in the VFS stat calls. At this moment it is triggered by a request to support the birthtime field for GPFS. GPFS does not extend the system level struct stat, but instead has a separate call that gets us the additional information beyond posix. Without being able to do that within the VFS stat calls, that support would have to be scattered around the main smbd code. It will very likely break all the onefs modules, but I think the changes will be reasonably easy to do.
2009-05-11Fix a bunch of compiler warnings about wrong format types.Jeremy Allison1-4/+4
Should make Solaris 10 builds look cleaner. Jeremy.
2009-02-10s3: Remove some unused varsTim Prouty1-5/+3
2009-02-09Add an optional SMB_STRUCT_SMB parameter to VFS_OP_READDIRSteven Danneman1-2/+33
* this allows VFS implementations that prefetch stat information on readdir to return it through one VFS call * backwards compatibility is maintained by passing in NULL * if the system readdir doesn't return stat info, the stat struct is set to invalid
2009-01-23Extend NTIMES to allow setting create_timetodd stecher1-4/+7
1) Add in smb_file_time struct to clarify code and make room for createtime. 2) Get and set create time from SMB messages. 3) Fixup existing VFS modules + examples Some OS'es allow for the setting of the birthtime through kernel interfaces. This value is generically used for Windows createtime, but is not settable in the code today.
2008-10-14Use {u,}int64_t instead of SMB_BIG_{U,}INT.Jelmer Vernooij1-1/+1
2008-09-15Fix build warning on FreeBSDSteven Danneman1-2/+2
Fix for the following build warning: Compiling torture/cmd_vfs.c torture/cmd_vfs.c: In function `cmd_open': torture/cmd_vfs.c:275: warning: unsigned int format, different type arg (arg 3) torture/cmd_vfs.c: In function `cmd_mknod': torture/cmd_vfs.c:992: warning: unsigned int format, different type arg (arg 3) sccanf had mismatched types for mode_t between formating parameter and var args.
2008-04-21Remove redundant parameter fd from SMB_VFS_CLOSE().Michael Adam1-1/+1
Now all those redundant fd's have vanished from the VFS API. Michael (This used to be commit 14294535512a7f191c5008e622b6708e417854ae)
2008-02-28Remove a useless variable.Michael Adam1-2/+1
Michael (This used to be commit 661b9f3d779b419e72968dd3b42348f9da68d803)
2008-01-30Fix some IBM checker warningsVolker Lendecke1-4/+4
(This used to be commit 0341b0be49fef5e6003a170100388b5c47a41e67)
2008-01-10Remove redundant parameter fd from SMB_VFS_WRITE().Michael Adam1-1/+1
Michael (This used to be commit c8ae7d095a2a6a7eac920a68ca7244e3a423e1b1)
2008-01-10Remove redundant parameter fd from SMB_VFS_READ().Michael Adam1-1/+1
Michael (This used to be commit a8fc2ddad8d5f7c6c00cb36c74a32a02d69d1d04)
2008-01-09Fix memory handling in torture/cmd_vfs.c:cmd_open and don't leak fsp_name.Michael Adam1-0/+13
Michael (This used to be commit f93fc818143a7442a6e8a90f16f60c536a5b8f9e)
2008-01-07Remove redundant parameter fd from SMB_VFS_LOCK().Michael Adam1-1/+1
Michael (This used to be commit 4f3ab2c406072e0b43581057e7e785e8ad454cfa)
2008-01-07Remove redundant parameter fd from SMB_VFS_FTRUNCATE().Michael Adam1-1/+1
Michael (This used to be commit 2ad66050a0452b8e7e08b1e7a01efa00c72fd451)
2008-01-07Remove redundant parameter fd from SMB_VFS_FCHOWN().Michael Adam1-1/+1
Michael (This used to be commit fbb193db3e0dc51cb000ae406a68bc547f31d9ab)
2008-01-07Remove redundant parameter fd from SMB_VFS_FCHMOD().Michael Adam1-1/+1
Michael (This used to be commit a54d5604da556d1250ca9948d4acc4a187a9fede)
2008-01-07Remove redundant parameter fd from SMB_VFS_FSTAT().Michael Adam1-1/+1
Michael (This used to be commit 0b86c420be94d295f6917a220b5d699f65b46711)
2008-01-07Remove redundant parameter fd from SMB_VFS_FSYNC().Michael Adam1-1/+1
Michael (This used to be commit 8f83c9a7b245dbfef28195f9a7f33047a8ba95a0)
2008-01-07Remove redundant parameter fd from SMB_VFS_LSEEK().Michael Adam1-1/+1
Michael (This used to be commit df929796f2698698d2875227bda8500589cca2df)
2007-10-18RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison1-1/+1
bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r22001: change prototype of dump_data(), so that it takes unsigned char * now,Stefan Metzmacher1-1/+1
which matches what samba4 has. also fix all the callers to prevent compiler warnings metze (This used to be commit fa322f0cc9c26a9537ba3f0a7d4e4a25941317e7)
2007-10-10r21715: Fix torture utime code.Jeremy Allison1-4/+4
Jeremy. (This used to be commit 10430bf75accc71045ed359314dc2711fea8df01)
2007-10-10r16945: Sync trunk -> 3.0 for 3.0.24 code. Still needJeremy Allison1-10/+14
to do the upper layer directories but this is what everyone is waiting for.... Jeremy. (This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10r8682: fix vfstest, thanks to Rainer Link for spotting this oneSimo Sorce1-0/+2
(This used to be commit a3b89cb5c13b7e51f27b74b87c03002f537154d5)
2007-10-10r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the tortureJeremy Allison1-1/+1
tests on this as it's very late NY time (just wanted to get this work into the tree). I'll test this over the weekend.... Jerry - in looking at the difference between the two trees there seem to be some printing/ntprinting.c and registry changes we might want to examine to try keep in sync. Jeremy. (This used to be commit c7fe18761e2c753afbffd3a78abff46472a9b8eb)
2007-10-10r7902: Fix the buildVolker Lendecke1-2/+2
(This used to be commit 6d431eb676e1df4cfdcbeaed5fa81adfbfc77325)
2007-10-10r6640: Attempt to fix 'make everything' with the paranoid malloc checker.Volker Lendecke1-1/+1
Volker (This used to be commit 3db2799822da3711b47b60ba13daa07205ced45f)
2007-10-10r6595: This is Volkers new-talloc patch. Just got the go-ahead fromJeremy Allison1-2/+2
Volker to commit. Woo Hoo ! Jeremy. (This used to be commit 316df944a456f150944761dab34add5e8c4ab699)
2007-10-10r4236: More *alloc fixes.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 6b25a6e088390d33314ca69c8f17c869cec3904b)
2007-10-10r3072: Fix for bug #1947 - incorrect use of getpwnam() etc. interface.Jeremy Allison1-6/+0
Jeremy. (This used to be commit aaab1120849efca11c68bdce9285bad25e05eecf)
2003-10-14Enclose usage of st_blksize and st_blocks struct stat members inTim Potter1-0/+12
#ifdef HAVE_STAT_ST_BLKSIZE and #ifdef HAVE_STAT_ST_BLOCKS, respectively. Fixes bug 550 reported by Joachim Schmitz <schmitz@hp.com>. (This used to be commit 18adfdbe0c6ed79ba8ac07956b1e7abc226556c3)
2003-08-27Add CAP VFS module from Monyo. Primary purpose of this module is to provide ↵Alexander Bokovoy1-6/+9
CAP-compatible encoded file names for CJKV (This used to be commit e8a5a962ed2218144cbb9c593d8e996c7d034b0c)
2003-07-22Fixup a bunch of printf-style functions and debugs to use unsigned long whenTim Potter1-3/+6
displaying pid_t, uid_t and gid_t values. This removes a whole lot of warnings on some of the 64-bit build farm machines as well as help us out when 64-bit uid/gid/pid values come along. (This used to be commit f93528ba007c8800a850678f35f499fb7360fb9a)
2003-05-14Prefix VFS API macros with SMB_ for consistency and to avoid problems with ↵Alexander Bokovoy1-33/+33
VFS_ macros at system side. We currently have one clash with AIX and its VFS_LOCK. Compiled and tested -- no new functionality or code, just plain rename of macros for yet-unreleased VFS API version. Needs to be done before a24 is out (This used to be commit c2689ed118b490e49497a76ed6a2251262018769)
2003-05-11Fix VFS layer:Alexander Bokovoy1-105/+96
1. Finally work with cascaded modules with private data storage per module 2. Convert VFS API to macro calls to simplify cascading 3. Add quota support to VFS layer (prepare to NT quota support) Patch by Stefan (metze) Metzemacher, with review of Jelmer and me Tested in past few weeks. Documentation to new VFS API for third-party developers to follow (This used to be commit 91984ef5caa2d13c5d52e1f535bd3bbbae1ec978)
2002-11-23Please compile with :Jeremy Allison1-20/+26
-g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual if you're using gcc. It really does help ! Jeremy. (This used to be commit 7daa880503f9ad6ae24a26f708c03ff1d119b7c0)
2002-08-21implemented lock and mknodSimo Sorce1-7/+118
addedd to vfstest the possibility to read a file to imput a stream of commands (This used to be commit 233b14f447994db8fdb4448d19eff0c38c17254d)
2002-08-19make IRIX happySimo Sorce1-10/+14
(This used to be commit bac73fa972c24503f12968810059745c81fa57a9)
2002-08-18O_NOFOLLOW does not exist on solaris 8 ??Simo Sorce1-0/+4
(This used to be commit 4280300d80d831b78ca50a0a4325b9e239a8bb63)
2002-08-18improvements and bugfixSimo Sorce1-17/+71
open calls now understands flags and mode bug on read (This used to be commit 751d057713a3fa8a5a141eaed4e8401e7802cfc9)
2002-08-18A new utility to test VFS system and modulesSimo Sorce1-0/+872
Just now it is acommandline tool like smbclient and rpcclient that is able to perform operations on the file system passing through the vfs layer It is not complete yet, some functions have simply faked up data, but module loading works yet and basic operations too. Thanks to Eric Lorimer for helping out with the initial setup. Simo. (This used to be commit 42ae5eb82657d4905bdaf247286f95599380afbb)