1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

40 Commits

Author SHA1 Message Date
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Andrew Tridgell
cc24c353bb added cli_locktype() for testing different lockingX lock types
(This used to be commit 136b9752fc)
2002-03-11 01:33:06 +00:00
Andrew Tridgell
69b395d2c1 better handling of a zero timeout in cli_lock
(This used to be commit 56662a75f5)
2002-03-10 23:16:15 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Jeremy Allison
5cf6457bcc Merged in %S fixes and XX_NOT_CHANGED fixes from 2.2.
Jeremy.
(This used to be commit 0fcca6c627)
2002-01-16 23:32:10 +00:00
Jeremy Allison
0173911b46 Added CIFS UNIX extension code to client.
Jeremy.
(This used to be commit 794c3e2c76)
2002-01-16 20:13:28 +00:00
Jeremy Allison
d6823366b8 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
(This used to be commit 01ff6ce496)
2002-01-11 19:10:25 +00:00
Jeremy Allison
30be58a857 Got serious about const again.
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 b1930abb35)
2001-11-04 00:14:08 +00:00
Jeremy Allison
f8e2baf39e Added NT_USER_TOKEN into server_info to fix extra groups problem.
Got "medieval on our ass" about const warnings (as many as I could :-).
Jeremy.
(This used to be commit ee5e7ca547)
2001-11-03 23:34:24 +00:00
Andrew Tridgell
23af074326 fixed ctemp in server and client. It turns out that ctemp on NT is 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 2d507ec669)
2001-09-17 04:23:48 +00:00
Simo Sorce
bcbd75f7ad move to SAFE_FREE()
(This used to be commit 48fc6a6cd5)
2001-09-17 03:33:37 +00:00
Andrew Tridgell
d53d5beeb2 use cli_is_error() instead of looking in smb_rcls, otherwise NT status
codes don't work correctly
(This used to be commit 55d5828e60)
2001-09-05 11:32:59 +00:00
Andrew Tridgell
f3c1c25b97 use 32 bit locking if client doesn't do 64 bit
(This used to be commit 759ca19f32)
2001-08-23 23:15:18 +00:00
Andrew Tridgell
75eae84b1c string terminate in mkdir
(This used to be commit fe414d5e1a)
2001-08-21 03:50:31 +00:00
Tim Potter
2ccfea3de7 A rewrite of the error handling in the libsmb client code. I've separated
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 6dbdb0d813)
2001-08-10 06:00:33 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
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 debb471267)
2001-07-04 07:15:53 +00:00
Jeremy Allison
82b76931cb Insure caught the fact that PTRDIFFs were being done between two unrelated
pointers.
Jeremy.
(This used to be commit 15c64199cb)
2001-07-02 00:33:15 +00:00
Andrew Tridgell
4ff011d88e Added STR_NOALIGN flags to clistr and srvstr fns. Yes, NT actually does
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 86613493a9)
2001-06-21 05:38:28 +00:00
Richard Sharpe
89de0c46ad Fix a small warning about char * vs unsigned char * that gets some compilers
in a twitch.
(This used to be commit 672242a52e)
2001-05-17 04:09:08 +00:00
Andrew Tridgell
ac9e221c3e merging from 2.2 to head
(This used to be commit bfcc6f8827)
2001-04-22 02:54:04 +00:00
Jeremy Allison
6e7f03f9b9 This is a big, rather ugly patch. Whilst investigating the files not truncated
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 51987684bd)
2001-03-30 08:57:24 +00:00
Jeremy Allison
34508053bf Added cli_nt_delete_on_close() call to allow flag to be set for torture tests.
Jeremy.
(This used to be commit 6f7d9e29e4)
2001-03-29 02:58:47 +00:00
Jeremy Allison
1b95784324 Added cli_nt_create_full() as a way to get at all the ntcreate parameters.
Used in smbtorture mods. Re-cast cli_nt_create() as a call to cli_nt_create_full().
Jeremy.
(This used to be commit f602fa1205)
2001-03-29 00:58:52 +00:00
Andrew Tridgell
9ea70bd003 simpler clistr interface which handles individual packets having
unicode bit set differently to capabilities
(This used to be commit 34a0821e08)
2001-03-14 12:42:43 +00:00
Andrew Tridgell
45c2ee3ff2 to use the same macros in the client and server rename the CLISTR_
macros to STR_
(This used to be commit 95c9e4e0ba)
2001-03-10 11:35:25 +00:00
Andrew Tridgell
21b1ab0a76 cope better with broken filer expectations
(This used to be commit 847de3b4ad)
2001-02-22 03:38:21 +00:00
Andrew Tridgell
a8ab984078 the unicode conversion of our client code is complete enough to be
enabled by default

you can disable it by setting the environment variable CLI_FORCE_ASCII
(This used to be commit 4d59c08c5e)
2001-02-21 03:40:20 +00:00
Andrew Tridgell
f76015333a yipee! client unicode now works well with nt
(This used to be commit 5b2ef8a1b9)
2001-02-20 23:52:27 +00:00
Andrew Tridgell
064898cf8a converted a bunch more fns
(This used to be commit f6b8d67304)
2001-02-20 13:16:01 +00:00
Andrew Tridgell
c28d3f6358 converted nt_create and setatr
(This used to be commit c40a1e4ebd)
2001-02-20 12:49:55 +00:00
Andrew Tridgell
8acf5e0448 - neater setting of bcc
- converted cli_rename and cli_unlink
(This used to be commit 0a8992e224)
2001-02-20 12:45:50 +00:00
Andrew Tridgell
20b037b849 converted cli_open()
(This used to be commit db60c0c262)
2001-02-20 12:30:01 +00:00
Andrew Tridgell
d4b2639c00 converted cli_chkpath()
(This used to be commit 95268f5255)
2001-02-20 12:25:42 +00:00
Andrew Tridgell
23ded01d93 converted cli_mkdir()
(This used to be commit bce3ed01a9)
2001-02-20 10:19:02 +00:00
Tim Potter
8fd4d9fab4 Added a cli_nt_create_uni() to do a ntcreate&x with a unicode filename,
regardless of the settings negotiated in the flags2 smb field.
(This used to be commit c4476c6315)
2000-12-21 05:22:15 +00:00
Andrew Tridgell
d931013008 pass the desired access into cli_nt_create()
(This used to be commit a2d07994e0)
2000-12-04 07:26:56 +00:00
Andrew Tridgell
3a01ece497 fixed indentation
(This used to be commit b7a1c00bed)
2000-12-04 06:39:14 +00:00
Jeremy Allison
6f58dd5871 Ok - fixed a bug in our levelII oplock code. We need to break a level II on
a byte range lock (write lock only, but Win2k breaks on read lock also so I
do the same) - if you think about why, this is obvious. Also fixed our client
code to do level II oplocks, if requested, and fixed the code where we would
assume the client wanted level II if it advertised itself as being level II
capable - it may not want that.
Jeremy.
(This used to be commit 213cd0b519)
2000-11-16 00:59:18 +00:00
Andrew Tridgell
3f35a785b1 added cli_lock64() and cli_unlock64()
(This used to be commit 91f0a3cc2f)
2000-09-29 04:41:52 +00:00
Andrew Tridgell
858e63cab3 split clientgen.c into several parts
the next step is splitting out the auth code, to make adding lukes
NTLMSSP support easier
(This used to be commit 10c5470835)
2000-04-25 14:04:06 +00:00