1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

947 Commits

Author SHA1 Message Date
Jeremy Allison
461641d0de Use defined constants not integers.
Jeremy.
(This used to be commit d20949fe509c1496bc434f0fbf403f0b69ab9954)
2001-11-10 01:49:50 +00:00
Jeremy Allison
c517caf305 Only 1mb allocate slop.
Jeremy.
(This used to be commit c339a99a891c9e4bbad59ee1243908c91f048834)
2001-11-08 02:17:03 +00:00
Jeremy Allison
00404139e1 Merge overdue changes from 2.2. Fix <4gb write problem.
Jeremy.
(This used to be commit 36ea09d3a041fab0854dfdc20f6ea8db7ccbec2e)
2001-11-08 01:49:57 +00:00
Jeremy Allison
04a0293601 Added more define bits. Fixed error in vol attributes.
Jeremy.
(This used to be commit eba8204bfadb176fafb686a35295a09f0f35b894)
2001-11-08 00:21:26 +00:00
Tim Potter
d876260d88 Don't put a \n on the end of the arg to exit_server()
(This used to be commit dfb8566220c3e90ca2b757ea124f53aed103269e)
2001-11-05 00:02:38 +00:00
Jeremy Allison
812dcab195 Made nt acl support a local parameter for w2ksp2 profile fix.
Jeremy.
(This used to be commit ebba334c15619610475a5c8242a55ed4fcdedf7c)
2001-10-12 22:00:38 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
2001-10-02 04:29:50 +00:00
Simo Sorce
61b2794968 move to SAFE_FREE()
(This used to be commit a95943fde0ad89ae3f2deca2f7ba9cb5ab612b74)
2001-09-17 11:25:41 +00:00
Jeremy Allison
851e60c382 Removed unneeded set of delete on close in fsp->share_mode.
Jeremy.
(This used to be commit 7816f79075132350c910f75f9b757477a319bbae)
2001-09-05 23:34:41 +00:00
Andrew Tridgell
627b1d0a61 when you update the share mode in the db you must also update
fsp->share_mode otherwise the check to see if the fsp share mode
matches the one in the db will fail when you come to delete it,
thus leaving us with a share mode on a file that isn't even open!
(This used to be commit 2020738b889d8d508cf787e5c5d380af817b92f9)
2001-09-05 21:13:58 +00:00
Andrew Tridgell
e8e98c9ea0 converted smbd to use NTSTATUS by default
major changes include:

- added NSTATUS type
- added automatic mapping between dos and nt error codes
- changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT()
  these calls auto-translate to the client error code system
- got rid of the cached error code and the writebmpx code

We eventually will need to also:
- get rid of BOOL, so we don't lose error info
- replace all ERROR_DOS() calls with ERROR_NT() calls

but that is too much for one night
(This used to be commit 83d9896c1ea8be796192b51a4678c2a3b87f7518)
2001-08-27 08:19:43 +00:00
Andrew Tridgell
db93134c32 fixed level2 find first for unisys clients
(This used to be commit cb8b21f71dbacc7ee658bef7011cd147fbe34101)
2001-08-24 20:11:26 +00:00
Jeremy Allison
964bfb2193 Fix W2K profiles writing to a Samba PDC. Thanks to Microsoft for their help !
Jeremy.
(This used to be commit faae7512e059456db2450f878c435fd402839146)
2001-08-23 23:37:40 +00:00
Tim Potter
4bbd1ddb27 More constant conversions.
(This used to be commit 00703d306f14a5977df75cb04ee34ae8628ed40e)
2001-08-10 05:50:47 +00:00
Jeremy Allison
c604830585 Fixed wrong placement of allocate code :-(.
Changed alignment offset to 1 to allow netmon to parse ok.
Jeremy.
(This used to be commit fd89261a2c74910bd1cf8271d862a7b050b49f32)
2001-08-09 20:01:35 +00:00
Jeremy Allison
0c218e1abe Added fixes to return correct error codes on space allocation fail.
Jeremy.
(This used to be commit 3bf2419f4b7a9d46a1d48062212a6a6579c22b92)
2001-08-07 01:19:32 +00:00
Jeremy Allison
819a911735 Added "strict allocate" per share parameter. This causes actual on-disk allocation
to be done. Without it just does the ftruncate.
Jeremy.
(This used to be commit 0b052f103e82369088bc30724b86d8892c395cdb)
2001-08-01 22:13:50 +00:00
Jeremy Allison
4b28b5a1bb Fix for potential crash bug with bad fid.
Jeremy.
(This used to be commit 82f81c830db53ce507c2a8e65db962f931141afd)
2001-07-28 01:26:44 +00:00
Andrew Tridgell
1cc543ffa1 fixed some unicode and LANMAN2 bugs in trans2 find first/next
(This used to be commit d5097b2f20c55ddcf4ae8da4d1d0a2fe91938a6b)
2001-07-07 21:24:00 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376d1a2b83690612304e85010b5e5f3cf)
2001-07-04 07:36:09 +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 debb471267960e56005a741817ebd227ecfc512a)
2001-07-04 07:15:53 +00:00
Jeremy Allison
17a0a89c79 Ensure we correctly round down to 2 second boundary if dos filetime
set for a share.
Jeremy.
(This used to be commit 8f57233c0f871763bc3657d754c894dbd29ae501)
2001-07-04 01:01:02 +00:00
Jeremy Allison
5f633c0e5e Set support for info levels...
Jeremy.
(This used to be commit e033f758914f6631545af17041b4e49c1ff885d9)
2001-06-19 00:11:12 +00:00
Jeremy Allison
c0be2fc029 Best-effort so far implementation of new W2K info levels.
An-embrace-and-extending we will go...
Jeremy.
(This used to be commit 43bf9b2c7aad15d65bac3a9c4f799be050a074cd)
2001-06-18 23:42:41 +00:00
Jeremy Allison
f63ee18c68 *Wonderful* patch from Andrew Bartlett that will help ensure tdb's are
cleaned on clients abending connections. Thanks Andrew !
Jeremy.
(This used to be commit 1b3977c5367a0b713b194f369abd9872ae01ac2a)
2001-06-09 01:38:54 +00:00
Jeremy Allison
79ca1f75bb Correctly make max pathlength 255.
Jeremy.
(This used to be commit 30cffea8fa813a7448648b496a19e751441e436e)
2001-06-08 02:49:30 +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 51987684bd231c744da2e5f3705fd236d5616173)
2001-03-30 08:57:24 +00:00
Jeremy Allison
559c1692e7 Insure fix. Don't read 4 bytes from data area unless there are 4 bytes to read.
Jeremy.
(This used to be commit 3f9cf2e07bb6d429858e47ab6989ea8cf30d0217)
2001-03-28 23:20:46 +00:00
Jeremy Allison
19faeac347 Made the fixes Andrew suggested to asci string code to use srvstr_push.
Jeremy.
(This used to be commit 1391aa6a6fbe8391a4421f5770da40556f011bb8)
2001-03-23 18:14:22 +00:00
Jeremy Allison
a447217509 Two OS/2 printer fixes from Jim McDonough @ IBM.
First one adds a new info level into the lanman printing and an ioctl to the trans2 code.
    Andrew - this uses ASCII only. It looks ok to me but please check !
Second one adds a parameter "os2 driver map" that allows OS/2 driver names to be mapped.
Jeremy.
(This used to be commit da79b519e0b6b4317d7fb5260d74e0e74a7e0b46)
2001-03-23 03:12:58 +00:00
Andrew Tridgell
096550d86c don't need to force unicode strings in flg2 anymore
(This used to be commit 899ca6e832c72ea68b0ac76205d18a80c87b34d9)
2001-03-16 06:17:45 +00:00
Andrew Tridgell
977e0be9b3 finished the conversion to unicode of the last of the trans2 fns
(This used to be commit 1d145a37860f7256a081c893e3640f5e18943518)
2001-03-16 04:09:47 +00:00
Andrew Tridgell
df03c7480d converted a bunch more trans2 calls for unicode. This got quite tricky :(
(This used to be commit ddee55087756db2a2ac0ee92471d9fea53f38bee)
2001-03-14 07:29:53 +00:00
Andrew Tridgell
ff0462cde8 simpler and more correct srvstr_push()
it now uses outbuf not inbuf for the unicode flag, which
allows for some server fns to be ascii and means one less
parameter in push calls
(This used to be commit a6dd6662267eeddf368ff0ffba76b45761bf4eeb)
2001-03-13 22:00:46 +00:00
Andrew Tridgell
f869164a16 converted findnext to unicode
(This used to be commit 84fc5a7795fe6e3b993649ecc05f6685f8295c02)
2001-03-13 01:51:44 +00:00
Andrew Tridgell
23e5cf060d this patch does a number of things:
- removes SMB_ALIGNMENT. That macro caused all sorts of problems with
  getting unicode aligned right in sub-protocols (such as SMBtrans and
  SMBtrans2). I believe the performance reasons for having
  SMB_ALIGNMENT has gone away with the new variants of the SMB
  protocol anyway, as newer commands tend to have their own internal
  alignment.

- fix the locations where we set smb_flg2 to absolute values. We must
  never do this if we want a hope of coping with unicode.

- add initial support for unicode on the wire in smbd. Currently
  enabled using SMBD_USE_UNICODE environment variable.
(This used to be commit b98b1435e9d8f8622444c9ff33082977e661f16b)
2001-03-13 00:55:19 +00:00
Jeremy Allison
da3053048c Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
(This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
2001-03-11 00:32:10 +00:00
Jeremy Allison
201753ddc6 Fixed file descriptor leak in error processing of print jobs.
NT sends "delete on close" to cancel a print job copied from the command line.
Deal with this. Merged JohnR's fixes for print job errors.
Jeremy.
(This used to be commit 2060d74e48d62c99a1689ee02ac435b71918ddf0)
2001-02-22 01:31:55 +00:00
Andrew Tridgell
b652abf923 reverted *.* patch until someone explains to me what the test case is
that requires this.

i _know_ that this isn't the right solution and it breaks things,
which is why I am reverting now.
(This used to be commit c2a82a33da1b717b16fb71e597587c806bcf68b3)
2001-02-08 23:33:50 +00:00
Gerald Carter
01634eaf12 merge from SAMBA_2_2
(This used to be commit 9347121ce6888afeae3cdf256b5f0c5b9c58b0bc)
2001-02-08 20:47:09 +00:00
Jeremy Allison
327e2b3029 Fix from Kenichi Okuyama for memory leak on Realloc fail.
Jeremy.
(This used to be commit 6e568332254cf60d6a1f411df960ac2ec5f4bf8e)
2001-01-23 22:21:46 +00:00
Jeremy Allison
60337746ea Fix for short names not being returned correctly with non-mangled shares.
Jeremy.
(This used to be commit bcf0a5c316ee8cf333d9d838b041e44a11cb5f1b)
2000-12-11 22:31:25 +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 213cd0b5192307cd4b0026cae94b2f52fb1b0c02)
2000-11-16 00:59:18 +00:00
Jeremy Allison
abf055046f Ok - this is a big patch - and it may break smbd a bit (although
I hope not). If you encounter strange file-serving behavior after this
patch then back it out. I analysed our stat() usage and realised we
were doing approx. 3 stat calls per open, and 2 per getattr/setattr.
This patch should fix all that. It causes the stat struct returned
from unix_convert() (which now *must* be passed a valid SMB_STRUCT_STAT
pointer) to be passed through into the open code. This should prevent
the multiple stats that were being done so as not to violate layer
encapsulation in the API's.

Herb - if you could run a NetBench test with this code and do a
padc/par syscall test and also run with the current 2.2.0 code
and test the padc/par syscalls I'd appreciate it - you should
find the number of stat calls reduced - not sure by how much.

The patch depends on unix_convert() actually finding the file
and returning a stat struct, or returning a zero'd out stat
struct if the file didn't exist. I believe we can guarentee this
to be the case - I just wasn't confident enough to make this
an assertion before.

Ok ok - I did write this whilst at the Miami conference.....
sometimes you get a little free time at these things :-).

Jeremy.
(This used to be commit 66a5c05ec46b641224fbe01b30bd7e83571a2a1b)
2000-10-19 02:58:24 +00:00
Herb Lewis
8719c27726 changes to sync with 2.2. tree
.cvsignore              remove config.h - not in this directory
include/profile.h       profile changes
lib/messages.c          added message to return debug level
libsmb/clierror.c       cast to get rid of compiler warning
libsmb/smbencrypt.c     cast to get rid of compiler warning
profile/profile.c       add flush profile stats changes for profile struct
rpc_parse/parse_samr.c  fix for compiler warning
rpc_server/srv_samr.c   cast to get rid of compiler warning
smbd/ipc.c              profile stats
message.c               profile stats
smbd/negprot.c          profile stats
smbd/nttrans.c          profile stats
smbd/trans2.c           profile stats
utils/smbcontrol.c      new flush stats command
(This used to be commit bbb24daa25dca4e4b6b1f8942cd84ee3aa1bed8e)
2000-10-11 05:31:39 +00:00
Jeremy Allison
636f146abf Restructuring of vfs layer to include a "this" pointer - can be an fsp or
a conn struct depending on the call.
We need this to have a clean NT ACL call interface.
This will break any existing VFS libraries (that's why this is pre-release
code).
Andrew gets credit for this one :-) :-).

In addition - added Herb's WITH_PROFILE changes - Herb - please examine
the changes I've made to the smbd/reply.c code you added. The original
code was very ugly and I have replaced it with a
START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor.
Please check this compiles ok with the --with-profile switch.
Jeremy.
(This used to be commit b07611f8159b0b3f42e7e02611be9f4d56de96f5)
2000-10-06 03:21:49 +00:00
Jeremy Allison
6692d0905e Fixes for the fact that UNICODE sizes are no always 2*no of chars when
in multibyte codepages. Fix from Hiroshi MIURA, Samba User Group Japan staff.
Jeremy.
(This used to be commit f2f373df67a3c6b0bd431c19e3494d45ef0a263c)
2000-10-03 19:15:05 +00:00
Jeremy Allison
3ad2ee22bb utf-8 and EUC3 patch from Hiroshi Miura Samba User Group Japan staff.
mkdir high bits patch from Robert Dahlem" <Robert.Dahlem@gmx.net>.
jeremy.
(This used to be commit b40191d27180ab1e59935086073c4d312552f717)
2000-10-03 02:12:14 +00:00
Shirish Kalele
8a86541e28 Changed MS_DFS to WITH_MSDFS throughout.
Fixed trans2 calls on IPC$ to let dfs referral calls through.
(This used to be commit e0965a80bdca5239886b11ef55dc29fed261bfc0)
2000-05-26 17:10:40 +00:00
Jeremy Allison
295b2d31a5 Did a proper fix for the file access on IPC$. Denied all pipe opens on
trans2 open calls as we don't have the pipe open response coded up yet.
Jeremy.
(This used to be commit 8142e27c9c32aba5a7dabc48a676b93cf680151b)
2000-05-23 17:57:51 +00:00