summaryrefslogtreecommitdiff
path: root/source3/libsmb/clifile.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r2665: Ensure the UNIX info level returned enough data.Jeremy Allison1-0/+6
Jeremy. (This used to be commit 8a7741dddf17dca136144fb26e2d7a42d313467a)
2007-10-10r2651: Added 'stat' command to smbclient to exercise the UNIX_FILE_BASICJeremy Allison1-1/+130
info level. Outputs data on the file in the same format the the stat command in Linux. Should be useful to people wanting to learn how to parse the UNIX extension output. Yes I will add the docs later :-). Jeremy. (This used to be commit b25cc596417d29815814c3968ac2627bf59ffc0b)
2007-10-10r1965: add cli_setattrE (inspired by samba4-code). needed for furtherGünther Deschner1-0/+41
migration-work. could someone possibly double-check the byte-count? Guenther (This used to be commit 27302905e88960d774c82eab6207ff6a918b0235)
2007-10-10r96: Stupid f&%'n UNIX extensions.... SETPATHINFOJeremy Allison1-9/+10
normally takes as it's param entry the filename to be acted upon.... Unless it's UNIX extensions create hardlink, or UNIX extensions create symlink. Then it's param -> newfile name data -> oldfile name. This caused me to stuff them up in 3.0.2 (and the client commands link and symlink). Fixed them, everything is now called oldname and newname - thus specifying which name should already exist (hint - the old one...) and which will be created (newname). Jeremy. (This used to be commit 21cc6ab7e8a41160a3e2970623ade7445b5214d6)
2004-03-30Ensure we cope correctly with ea length of zero. Detect torture fail correctly.Jeremy Allison1-0/+6
Jeremy. (This used to be commit 43db249fb814cef99afecd22c20a824d2519faf9)
2004-03-29Fix get/set of EA's in client library. Added torture test for it.Jeremy Allison1-74/+163
Jeremy. (This used to be commit 0d239a9c070bdc1ce2d2806fc02549c4750597aa)
2004-03-27Working (tested) client code for setting EA's by filename and fnum.Jeremy Allison1-5/+100
Now for parsing out the retrieved EA's. Jeremy. (This used to be commit 5eeeee302cec2cc1f6c130ed44be9df028f73cde)
2004-03-24Added cli_set_ea(), cli_get_ea next...Jeremy Allison1-0/+64
Jeremy. (This used to be commit b0c109c40335a2f59406e1d2845d676d211faf14)
2004-03-03Added client "hardlink" commant to test doing NT rename with hard links.Jeremy Allison1-2/+42
Added hardlink_internals() code - UNIX extensions now use this too. Jeremy. (This used to be commit aad6eb2240393931940c982e25a981ce32264f38)
2004-03-03Use a common function to parse all pathnames from the wire. This allowsJeremy Allison1-0/+38
much closer emulation of Win2k3 error return codes. Jeremy. (This used to be commit c9f31fafeda6ad79e590276f36e03ecd2e93f818)
2003-09-05More tuning from cachegrind. Change most trim_string() calls to trim_char(0,Jeremy Allison1-2/+3
as that's what they do. Fix string_replace() to fast-path ascii. Jeremy. (This used to be commit f35e9a8b909d3c74be47083ccc4a4e91a14938db)
2003-06-10fixed libsmb code to set correct timeout in cli_state when waiting forAndrew Tridgell1-2/+2
a blocking lock (This used to be commit 3515476fe436132d4569ac9067ea6195ab087e77)
2003-04-23Merge torture tests from HEAD - it looks like we had rather an incompleteAndrew Bartlett1-1/+31
merge last time. I hope this might fix a few failures on the build farm too. Andrew Bartlett (This used to be commit 0c837126923cc30fa60223a5a68d4f527971cc7b)
2003-04-15merge in metze' smbcquotas patch from HEADGerald Carter1-7/+10
(This used to be commit b6a77048886151435a4a5eeb9a04be44d397c504)
2003-03-18Jeremy merged across my string parinoia fixes, but forgot to enable them! :-)Andrew Bartlett1-1/+1
This patch catches up on the rest of the work - as much string checking as is possible is done at compile time, and the rest at runtime. Lots of code converted to pstrcpy() etc, and other code reworked to correctly call sizeof(). Andrew Bartlett (This used to be commit c5b604e2ee67d74241ae2fa07ae904647d35a2be)
2003-03-13Merge from HEAD. 'win2000 can take much longer than the specified time to ↵Jeremy Allison1-1/+1
respond to a lock - so to make the torture tests valid I give it a grace time of 10 seconds instead of 2' Jeremy. (This used to be commit 41571a69e04838c00de7d4a528c59cd1e88919d0)
2003-03-13Change size parameters from signed to unsigned to fix up warnings.Jeremy Allison1-6/+6
Jeremy. (This used to be commit 33b11d5eb53bdeb9d279d221fd5c01579253e1c7)
2003-03-03More janitorial duties, fixing the BIG_UINT changes for large offsets.Richard Sharpe1-1/+1
(This used to be commit 1af39523cc3b2313f3e8acd4f2e5338182ec0b13)
2002-09-25sync'ing up for 3.0alpha20 releaseGerald Carter1-1/+1
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
2002-07-15updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell1-1/+1
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-03-11added cli_locktype() for testing different lockingX lock typesAndrew Tridgell1-0/+54
(This used to be commit 136b9752fc9da86f0ad0e1f46dc389b752975aea)
2002-03-10better handling of a zero timeout in cli_lockAndrew Tridgell1-2/+6
(This used to be commit 56662a75f58d35cec1a5b2d6c9a4315d95a22420)
2002-01-30Removed version number from file header.Tim Potter1-2/+1
Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-16Merged in %S fixes and XX_NOT_CHANGED fixes from 2.2.Jeremy Allison1-2/+2
Jeremy. (This used to be commit 0fcca6c627a5c9c2219ec9714df5e0bc1a44cc29)
2002-01-16Added CIFS UNIX extension code to client.Jeremy Allison1-0/+164
Jeremy. (This used to be commit 794c3e2c76aae57d054e46b185def104ca02977c)
2002-01-11Same fix as went into 2.2 (I'm waiting for jerry to finish some code).Jeremy Allison1-26/+26
Jeremy. (This used to be commit 01ff6ce4963e1daff019f2b936cef218e1c93f67)
2001-11-04Got serious about const again.Jeremy Allison1-68/+65
REMOVED BZERO CALLS YET AGAIN !!! Why do these keep creeping back in.... They are *NOT* POSIX. I'm also thinking of removing strncpy as I'm sure it's not being used correctly.... Jeremy. (This used to be commit b1930abb35dee74f858a3f7190276c418af2322b)
2001-11-03Added NT_USER_TOKEN into server_info to fix extra groups problem.Jeremy Allison1-3/+3
Got "medieval on our ass" about const warnings (as many as I could :-). Jeremy. (This used to be commit ee5e7ca547eff016818ba5c43b8ea0c9fa69b808)
2001-09-17fixed ctemp in server and client. It turns out that ctemp on NT is ↵Andrew Tridgell1-3/+12
completely broken, and it's pointless to emulate their brokenness completely in this case, but at least this makes us use approximately the same packet format. The spec is complelet wrong in this case (This used to be commit 2d507ec669def6d49304559e53d6c14af9b290a9)
2001-09-17move to SAFE_FREE()Simo Sorce1-2/+2
(This used to be commit 48fc6a6cd52e01b287030fbbf0aa08a6814c5e11)
2001-09-05use cli_is_error() instead of looking in smb_rcls, otherwise NT statusAndrew Tridgell1-19/+15
codes don't work correctly (This used to be commit 55d5828e608671f070a9e96938be0d16d50aeb26)
2001-08-23use 32 bit locking if client doesn't do 64 bitAndrew Tridgell1-0/+8
(This used to be commit 759ca19f3223c28e3e3478b4001251d2cb0fbfd6)
2001-08-21string terminate in mkdirAndrew Tridgell1-1/+1
(This used to be commit fe414d5e1afdfe7bb20ff5da60394ffd9fa81b05)
2001-08-10A rewrite of the error handling in the libsmb client code. I've separatedTim Potter1-1/+1
out the error handling into a bunch of separate functions rather than all being handled in one big function. Fetch error codes from the last received packet: void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *num); uint32 cli_nt_error(struct cli_state *); Convert errors to UNIX errno values: int cli_errno_from_dos(uint8 eclass, uint32 num); int cli_errno_from_nt(uint32 status); int cli_errno(struct cli_state *cli); Detect different kinds of errors: BOOL cli_is_dos_error(struct cli_state *cli); BOOL cli_is_nt_error(struct cli_state *cli); BOOL cli_is_error(struct cli_state *cli); This also means we now support CAP_STATUS32 as we can decode and understand NT errors instead of just DOS errors. Yay! Ported a whole bunch of files in libsmb to use this new API instead of the just the DOS error. (This used to be commit 6dbdb0d813f3c7ab20b38baa1223b0b479aadec9)
2001-07-04The big character set handling changeover!Andrew Tridgell1-13/+13
This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a)
2001-07-02Insure caught the fact that PTRDIFFs were being done between two unrelatedJeremy Allison1-1/+1
pointers. Jeremy. (This used to be commit 15c64199cb29e2fca6ee7353673dbb3f962e0e24)
2001-06-21Added STR_NOALIGN flags to clistr and srvstr fns. Yes, NT actually doesAndrew Tridgell1-2/+4
send unaligned unicode strings sometimes! Fixed our handling of the workgroup name tacked on the end of the NT1 negprot response (a unaligned unicode) fixed a couple of places where we should be using the message_end fns instead of pre-calculated buffer lengths (This used to be commit 86613493a9b2e56523153486931d0bf8d39beb7a)
2001-05-17Fix a small warning about char * vs unsigned char * that gets some compilersRichard Sharpe1-1/+1
in a twitch. (This used to be commit 672242a52eafde35cba4657bce248fef0df9e46b)
2001-04-22merging from 2.2 to headAndrew Tridgell1-8/+45
(This used to be commit bfcc6f88271025760732271f03933839b1cbe0de)
2001-03-30This is a big, rather ugly patch. Whilst investigating the files not truncatedJeremy Allison1-4/+4
when copying to a full disk problem, I discovered that we were not allowing the delete on close flag to be set properly, this led to other things, and after investigation of the proper delete on close semantics and their relationship to the file_share_delete flag I discovered there were some cases where we weren't doing the deny modes properly. And this after only 5 years working on them..... :-) :-). So here's the latest attempt. I realised the delete on close flag needs to be set across all smbds with a dev/ino pair open - in addition, the delete on close flag, allow share delete and delete access requested all need to be stored in the share mode tdb. The "delete_on_close" entry in the fsp struct is now redundant and should really be removed. This may also mean we can get rid of the "iterate_fsp" calls that I didn't like adding in the first place. Whilst doing this patch, I also discovered we needed to do the se_map_generic() call for file opens and POSIX ACL mapping, so I added that also. This code, although ugly, now passes the deny mode torture tests plus the delete on close tests I added. I do need to add one more multiple connection delete on close test to make sure I got the semantics exactly right, plus we should also (as Andrew suggested) move to random testing here. The good news is that NT should now correctly delete the file on disk full error when copying to a disk :-). Jeremy. (This used to be commit 51987684bd231c744da2e5f3705fd236d5616173)
2001-03-29Added cli_nt_delete_on_close() call to allow flag to be set for torture tests.Jeremy Allison1-0/+41
Jeremy. (This used to be commit 6f7d9e29e4d3a17254ff0ae20c0da63eacded7fe)
2001-03-29Added cli_nt_create_full() as a way to get at all the ntcreate parameters.Jeremy Allison1-6/+20
Used in smbtorture mods. Re-cast cli_nt_create() as a call to cli_nt_create_full(). Jeremy. (This used to be commit f602fa1205e99541e825ccae8502c35cd0e7ccfc)
2001-03-14simpler clistr interface which handles individual packets havingAndrew Tridgell1-1/+1
unicode bit set differently to capabilities (This used to be commit 34a0821e087810381996f5ff6cf3b4d7b9bb53a0)
2001-03-10to use the same macros in the client and server rename the CLISTR_Andrew Tridgell1-11/+11
macros to STR_ (This used to be commit 95c9e4e0ba8f37f565aaf136f41eb76489441ff7)
2001-02-22cope better with broken filer expectationsAndrew Tridgell1-2/+2
(This used to be commit 847de3b4adfb00a98032e478b2663d09e240380e)
2001-02-21the unicode conversion of our client code is complete enough to beAndrew Tridgell1-50/+0
enabled by default you can disable it by setting the environment variable CLI_FORCE_ASCII (This used to be commit 4d59c08c5e6f54c0d6ced7650750cb987e77b6c9)
2001-02-20yipee! client unicode now works well with ntAndrew Tridgell1-3/+9
(This used to be commit 5b2ef8a1b914265c6072c968d2dad7d26c2aeffc)
2001-02-20converted a bunch more fnsAndrew Tridgell1-15/+25
(This used to be commit f6b8d6730452522f77852af0917cb48424d4c8a9)
2001-02-20converted nt_create and setatrAndrew Tridgell1-9/+10
(This used to be commit c40a1e4ebdb379482bf6e7d4efcc9b5321a4e7c6)
2001-02-20- neater setting of bccAndrew Tridgell1-13/+14
- converted cli_rename and cli_unlink (This used to be commit 0a8992e224b7a3d90d45b13d73fa8a6f155efa79)