1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00

1195 Commits

Author SHA1 Message Date
Jeremy Allison
d9fdaae54e Fixed potential bug in "become_guest" pointed out by elrond. Get_Pwnam()
returns a pointer to changable storage so ensure we save the details and
don't use the pointer directly.
Jeremy.
-
Jeremy Allison
5baef56831 This little piece of insanity is inspired by the
fact that an NT client can open a file for O_RDONLY,
but set the create disposition to FILE_EXISTS_TRUNCATE.
If the client *can* write to the file, then it expects to
truncate the file, even though it is opening for readonly.
Quicken uses this stupid trick in backup file creation...
Thanks *greatly* to "David W. Chapman Jr." <dwcjr@inethouston.net>
for helping track this one down. It didn't bite us in 2.0.x
as we always opened files read-write in that release.
Jeremy.
-
Jeremy Allison
32397e5bc6 configure:
configure.in:
include/config.h.in:
include/profile.h:
smbd/vfs-wrap.c:
smbd/vfs.c:
Added fchmod and fchown to VFS (sorry Gerald - but we needed them anyway).
smbd/dosmode.c:
smbd/files.c:
printing/printfsp.c:
smbd/close.c:
smbd/open.c:
Fixed "dos filemode" correctly so there are no race conditions. Forces test
of open of file O_WRONLY before allowing fchmod as root. Afterwards, calls
standard close function that preserves POSIX locks due to POSIX-me-harder
braindamage. :-). Andrew please review this code.
Also - in removing the tmpdir param in smbrun an extra NULL parameter
was missed in each print_run_command() call (which is a varargs fn.).
Now fixed.
Jeremy.
-
Jeremy Allison
5870e6019b Michael Davidson <md@sco.COM> pointed out that acl_get_qualifier can potentially
return a malloced area so added sys_acl_free_qualifier() calls to all supported
ACL interfaces to code with this (only Linux needs actual free call).
Jeremy.
-
Jeremy Allison
192887fe72 Fixed potential file descriptor leak with MS-Access fix.
Jeremy.
-
Jeremy Allison
a1eb2752a8 Added fix from "Eric Boehm" <boehm@nortelnetworks.com> to try and set hard
limit before setting soft limit.
Jeremy.
-
Jeremy Allison
fc76681812 Merge of Andrew's changes in 2.2.
Jeremy.
-
Jeremy Allison
e7d59d6de8 As Andrew suggested, make smbrun return a fd for a deleted file which can then
be read.
Jeremy.
-
Jeremy Allison
9b32b8a8cf To stop people complaining about the mktemp call, move it into lib/util.c. Thanks
to Andrew for all this code. Fixed extra line in lib/sysacls.c that broke
XFS ACL code.
Jeremy.
-
Jeremy Allison
20b13bafdf Fix for core dump in security = share code with new share security db.
Jeremy.
-
Jeremy Allison
036b1a8b09 Added set/get SD's on shares. Check before tcon.
Jeremy.
-
Jeremy Allison
94747b4639 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
-
Jeremy Allison
f50ea32dd0 Fix from Ed Boraas for not core dumping when out of connection structs.
Jeremy.
-
Jeremy Allison
bd2fe239db Fix from "Romeril, Alan" <a.romeril@ic.ac.uk> to get his NFS quota code
to work on Solaris 2.6.
Jeremy.
-
Jeremy Allison
181d41572c Integrated solaris nfs quota code from Alan Romeril <a.romeril@ic.ac.uk>
Jeremy
-
Andrew Tridgell
8b0e3679a6 started converting some of the only-ascii code to use srvstr_*
added srvstr_push_ascii() and srvstr_pull_ascii() as convenience
routines to replace the current usage of strncpy() like fns
for packet pull/push. We need to do this in *lots* of places
in Samba in order to get our codepage handling right
-
Jeremy Allison
f952380c5d utils/torture.c: Added one more delete on close test.
smbd/notify_kernel.c: This code was wrong I believe. It was structured to only
return a changenotify event on being called from timeout processing (t != 0).
The kernel changenotify events should fire on *asynchronous* processing (EINTR
return from select caused by the realtime signal delivery) with t == 0.
Reported by Juergen Hasch (Hasch@t-online.de).
ANDREW PLEASE CHECK THIS !
Currently the hash style changenotify is done on async processing as well
as timeout processing. As this is expensive we may want to revisit doing this
and maybe set it to fire only on timeout processing.
Jeremy.
-
Jeremy Allison
fe38692643 Fixed extern ref typo for file generic perms. 2am coding strikes again :-).
Jeremy.
-
Jeremy Allison
51987684bd 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.
-
Jeremy Allison
3f9cf2e07b Insure fix. Don't read 4 bytes from data area unless there are 4 bytes to read.
Jeremy.
-
Jeremy Allison
4fa8cf68c3 Fixed the problem Gerald reported. Unfortunately we need to go back to
reporting imaginary "default" inheritable ACLs on directories, otherwise,
when you add an entry and click on apply without noticing there's no
default entry associated with it, it applies a null acl on the files
within the directory (hey, that's what you told NT you wanted, right ! :-).
Also ensure that minimum permissions for a directory are r-x for owner,
not just r--.
Jeremy.
-
Jeremy Allison
13c9823eb1 Removed NFS quotas code for Solaris as Alan wants to re-write it.
Jeremy.
-
Jeremy Allison
3d2c59bfe0 Added NFS quota support for Solaris 5.x from Alan Romeril <a.romeril@ic.ac.uk>.
sun1.samba.org is down at the moment so I can't test the compile on this. I'm
sure Solaris people using quotas will scream if I've meesed anything up :-).
Jeremy.
-
Jeremy Allison
7c718fc85e Bail out early if null passwords and lp_null_passwords not set.
Jeremy.
-
Jeremy Allison
07cee46d1d Patch from Massimo Sivilotti <mass@tanner.com> to log remote machine/ip on
connection fail.
Jeremy.
-
Jeremy Allison
109a174de9 Patch from Sean.Batt@anu.edu.au to ensure error reporting is done before
any code that could modify errno is called.
Jeremy.
-
Jeremy Allison
641ada44ae smbd/posix_acls.c: Saving and restoring errno here is the wrong place. Moved it
to the places where [f]chmod_acl is called instead.
Jeremy.
-
Jeremy Allison
d43d907c38 Ensure get/set NT ACL code is redirected through vfs.
Jeremy.
-
Jeremy Allison
83f52394e6 smbd/posix_acls.c: Sync up with 2.2 changes - don't return deny ACE's.
smbd/vfs.c: Don't call [f]chmod_acl if no acl support.
Jeremy.
-
Jeremy Allison
38b19fad28 More unused variables.
Jeremy.
-
Jeremy Allison
1391aa6a6f Made the fixes Andrew suggested to asci string code to use srvstr_push.
Jeremy.
-
Jeremy Allison
da79b519e0 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.
-
Jeremy Allison
29414fe0d6 groupdb/mapping.c:
include/proto.h: Fix missing (void) in proto.
rpc_server/srv_samr_nt.c: Fix user private group problem by filtering out groups that
							clash with users.
smbd/posix_acls.c: Ensure default ACE's are sensible.
utils/pdbedit.c: Fix from Simo Sorce.
Jeremy.
-
Jeremy Allison
5b9a88c2d0 Sync up with 2.2 ACL code.
Jeremy.
-
Jean-François Micouleau
7154deb026 first pass of the new group mapping code
J.F.
-
Jeremy Allison
852b9e15ac New POSIX ACL mapping code. Works with UNIX permissions, now for testing
with real ACLs...
Jeremy.
-
Jeremy Allison
80c18d8849 Fix for crash when doing name lookup with a quoted string. Part of
lookup_name was expecting to be able to write to the string. Changed
lookup_name to use const.
Jeremy.
-
Jeremy Allison
49f0e7e714 Added sys_dlopen/sys_dlsym/sys_dlclose.
Jeremy.
-
Andrew Tridgell
e430ded56e fixed some compilation errors with IRIX cc -
Andrew Tridgell
0ea62800ed ADMIN$ is an IPC share, not a disk share -
Jeremy Allison
af364b93d9 lib/system.c (Finally) fixed all insure errors in password caching code. We can't
stop libc routines from calling getpwXXX functions, so caching a pointer to them
is impossible. This new code now makes two copies of the returned struct passwd
struct - one used as a cache, one returned to allow the caller to modify. When
doing a lookup we compare against the cached copy. Code is now easier to understand
also.
smbd/posix_acls.c: If we move the head of the linked list, remember to pass a
reference to that pointer.....
Jeremy.
-
Jeremy Allison
7b97ac289e I'm happy with the mapping for NT getACL, now for NT setACL.
Jeremy.
-
Andrew Tridgell
899ca6e832 don't need to force unicode strings in flg2 anymore -
Andrew Tridgell
1d145a3786 finished the conversion to unicode of the last of the trans2 fns -
Andrew Tridgell
ecc2c35ca0 converted the nttrans code to unicode on the wire -
Andrew Tridgell
70d6b09ac9 converted reply_printqueue -
Andrew Tridgell
0331f93a81 converted reply_search -
Andrew Tridgell
e787fc1daf enable unicode on the wire by default in smbd
the unicode support isn't complete, but it is good enough to be usable
for a test server.
-
Jeremy Allison
0d6c7dedd2 Tidyup return of zero-permissions (map to ACE_DENIED, GENERIC_ALL, Everyone).
Jeremy.
-
Jeremy Allison
45e96777d0 Last tweak (I promise :-). Fallback to returning our SID if we're a domain
member but can't get the domain sid.
Jeremy.
-