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

1222 Commits

Author SHA1 Message Date
Jeremy Allison
998fcd3f1e Patch from David_Tiller@ccnotes.ccity.com finally applied now I've thought
about it to stop account lockouts with "security=server" mode. Sorry for
the delay David.
Jeremy.
(This used to be commit e881971503)
2001-05-06 20:56:14 +00:00
Jean-François Micouleau
f35157f392 Big cleanup of passdb and backends.
I did some basic tests but I have probably broken something. Notably the
password changing. So don't cry ;-)

	J.F.
(This used to be commit a4a4c02b12)
2001-05-04 15:44:27 +00:00
Gerald Carter
1f7a451c1e merge from 2.2 in password_ok() to ensure that we check the
return code from smb_pam_accountcheck()
(This used to be commit d5d6f01aaf)
2001-05-04 14:28:28 +00:00
Jeremy Allison
548d16869a Fixed SHM_R/SHM_W warnings by moving sys/ipc.h and sys/shm.h into includes.h
and using autoconf tests.
Added "restrict acl with mask" parameter.
Jeremy.
(This used to be commit 7792e32ba7)
2001-05-03 19:47:30 +00:00
Jeremy Allison
aac630b382 Had to add a "pam password change" parameter (defaults to "off") and inlined
the pam password change code to ensure that existing and working password
chat scripts don't break with 2.2.1. PAM password changing has to be explicitly
requested.
Allowed wildcards in pam password change matching (matches password chat
script matching). Had to add const (sorry Tim :-) to ms_fnmatch() to
stop warnings. Don't worry - the const changes are isolated and don't
cause any other warnings :-).
Jeremy.
(This used to be commit 47b4d82536)
2001-05-02 23:32:09 +00:00
Jeremy Allison
c3a999409d Based on an original PAM patch by Andrew Bartlett, re-written by me to
remove global static PAM variables, and to tidy up the PAM internals code.
Now looks like the rest of Samba.
Still needs testing.
Jeremy.
(This used to be commit 1648ac64a7)
2001-04-30 21:05:58 +00:00
Andrew Tridgell
63602d15af - fixed some compiler warnings
- fixed slprintf and vsprintf macros
(This used to be commit c986a3c51e)
2001-04-28 14:01:02 +00:00
Andrew Tridgell
d095b5249c - added test for vasprintf
- cleaned up GNUC printf attribute macros
- added enum handling in mkproto
- removed non-vararg code
- made slprintf and vslprintf just macros for snprintf and vsnprintf
- don't need slprintf code any more
(This used to be commit c7aeb2254d)
2001-04-28 13:49:34 +00:00
Andrew Tridgell
944aeb7de4 use asprintf for hideunreadable option
(This used to be commit 338d5ca8ad)
2001-04-28 12:43:15 +00:00
Jeremy Allison
b238f4a2ff rpcclient/rpcclient.c: Non-void return in void function.
smbd/sec_ctx.c: Fixed potential memory leak spotted by
Kenichi Okuyama@Tokyo Research Lab, IBM-Japan, Co.
utils/nmblookup.c: gcc warning on Solaris fix.
Jeremy.
(This used to be commit 1be60597cd)
2001-04-28 00:05:11 +00:00
Jeremy Allison
c11887e325 More debug %d -> %u issues.
Jeremy.
(This used to be commit 6fcb600dcd)
2001-04-27 22:17:10 +00:00
Jeremy Allison
38959a2105 Tidy up args to DEBUG Statements - found by gcc on Solaris.
Jeremy.
(This used to be commit a60ecb4e53)
2001-04-27 21:14:18 +00:00
Jeremy Allison
8f88c7cf4e Fixes for problems in NFS server code from Michael Gerdts <Michael.Gerdts@usa.alcatel.com>.
Jeremy.
(This used to be commit 2fd5e0bf14)
2001-04-27 19:56:15 +00:00
Jeremy Allison
77429f8717 Fix from matthew.hart@veritas.com - bad error return from linux_oplock_receive_message().
Jeremy.
(This used to be commit b35ca2c6b1)
2001-04-27 18:03:12 +00:00
Jeremy Allison
95559fe994 Sync with default perm changes in 2.2.
Jeremy.
(This used to be commit f02e67a096)
2001-04-25 23:25:58 +00:00
Jeremy Allison
30daf2e939 Fixed memory leak in new session code.
Jeremy.
(This used to be commit 43b69e5d6e)
2001-04-23 23:07:31 +00:00
Jeremy Allison
ae8418d0c4 Added smb_ prefix to all Samba wrapper pam functions.
Fixed off by one bug using StrnCpy instead of strdup().
Jeremy.
(This used to be commit d4b1c0be2e)
2001-04-23 04:15:35 +00:00
Jeremy Allison
e277c08631 Commit of a modified version of Andrew Bartlett's patch that removes the
horrid utmp hostname parameter - now uses the client name instead.
Also tidies up some of the unencrypted password checking when PAM
is compiled in.
FIXME ! An pam_accountcheck() is being called even when smb encrypted
passwords are negotiated. Is this the correct thing to do when winbindd
is running ! This needs *SEVERE* testing....
Jeremy.
(This used to be commit 071c799f47)
2001-04-22 07:20:24 +00:00
Jeremy Allison
e129db422b Fixed compile bug when using --with-pam but not --with-utmp.
Jeremy.
(This used to be commit 1e09874467)
2001-04-21 07:43:54 +00:00
Jean-François Micouleau
6e4b008829 a missing string conversion.
J.F.
(This used to be commit 9513eb87c2)
2001-04-18 17:57:53 +00:00
Andrew Tridgell
3b4d7082cb new files for head
(This used to be commit c0d4a1f5dd)
2001-04-18 16:42:07 +00:00
Andrew Tridgell
9ce5a03ccb merge from 2.2
(This used to be commit f52a5014ee)
2001-04-18 16:41:04 +00:00
Jeremy Allison
6f78636a56 Removed mktemp from HEAD - same as done in 2.2.
Jeremy.
(This used to be commit 121b59669f)
2001-04-18 05:12:46 +00:00
Jeremy Allison
a5bd9ef712 Rememver to use VFS at all times... even in new user_can_read_file code :-).
Jeremy.
(This used to be commit 0d10113d01)
2001-04-18 02:27:23 +00:00
Andrew Tridgell
4355098a75 hide unreadable patch from idra
(This used to be commit 7b6cfe2430)
2001-04-16 15:16:31 +00:00
Jeremy Allison
71ae6a09cd Finally got the semantics right (hurrah!).
Jeremy.
(This used to be commit 362574c5a3)
2001-04-16 00:34:03 +00:00
Jeremy Allison
d5b74f7130 Correct fix for open readonly with truncate.
Jeremy.
(This used to be commit 6706e258e1)
2001-04-16 00:02:29 +00:00
Jeremy Allison
18f3f5ff92 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.
(This used to be commit d9fdaae54e)
2001-04-15 23:36:05 +00:00
Jeremy Allison
2df39394fe 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.
(This used to be commit 5baef56831)
2001-04-14 20:47:30 +00:00
Jeremy Allison
53850c51ca 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.
(This used to be commit 32397e5bc6)
2001-04-14 00:19:12 +00:00
Jeremy Allison
9444e9d9f3 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.
(This used to be commit 5870e6019b)
2001-04-13 21:11:57 +00:00
Jeremy Allison
819482c071 Fixed potential file descriptor leak with MS-Access fix.
Jeremy.
(This used to be commit 192887fe72)
2001-04-13 20:49:11 +00:00
Jeremy Allison
3c2c047e82 Added fix from "Eric Boehm" <boehm@nortelnetworks.com> to try and set hard
limit before setting soft limit.
Jeremy.
(This used to be commit a1eb2752a8)
2001-04-13 19:33:26 +00:00
Jeremy Allison
2ef68c7e92 Merge of Andrew's changes in 2.2.
Jeremy.
(This used to be commit fc76681812)
2001-04-13 19:12:06 +00:00
Jeremy Allison
50e78a9ac8 As Andrew suggested, make smbrun return a fd for a deleted file which can then
be read.
Jeremy.
(This used to be commit e7d59d6de8)
2001-04-13 00:37:00 +00:00
Jeremy Allison
6578fd8742 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.
(This used to be commit 9b32b8a8cf)
2001-04-11 23:19:08 +00:00
Jeremy Allison
0ca9f5c023 Fix for core dump in security = share code with new share security db.
Jeremy.
(This used to be commit 20b13bafdf)
2001-04-11 21:19:25 +00:00
Jeremy Allison
9d6dd97624 Added set/get SD's on shares. Check before tcon.
Jeremy.
(This used to be commit 036b1a8b09)
2001-04-09 06:36:38 +00:00
Jeremy Allison
f9a15ce1a6 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
(This used to be commit 94747b4639)
2001-04-08 20:22:39 +00:00
Jeremy Allison
d4e8c87005 Fix from Ed Boraas for not core dumping when out of connection structs.
Jeremy.
(This used to be commit f50ea32dd0)
2001-04-06 20:32:36 +00:00
Jeremy Allison
5d60916596 Fix from "Romeril, Alan" <a.romeril@ic.ac.uk> to get his NFS quota code
to work on Solaris 2.6.
Jeremy.
(This used to be commit bd2fe239db)
2001-04-05 20:46:15 +00:00
Jeremy Allison
f439f72cee Integrated solaris nfs quota code from Alan Romeril <a.romeril@ic.ac.uk>
Jeremy
(This used to be commit 181d41572c)
2001-04-01 19:00:43 +00:00
Andrew Tridgell
578a9fabfb 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
(This used to be commit 8b0e3679a6)
2001-03-31 13:48:24 +00:00
Jeremy Allison
fd6e9d6db9 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.
(This used to be commit f952380c5d)
2001-03-30 21:53:33 +00:00
Jeremy Allison
94f0c652fe Fixed extern ref typo for file generic perms. 2am coding strikes again :-).
Jeremy.
(This used to be commit fe38692643)
2001-03-30 18:07:43 +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
559c1692e7 Insure fix. Don't read 4 bytes from data area unless there are 4 bytes to read.
Jeremy.
(This used to be commit 3f9cf2e07b)
2001-03-28 23:20:46 +00:00
Jeremy Allison
a6d350881c 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.
(This used to be commit 4fa8cf68c3)
2001-03-28 01:33:57 +00:00
Jeremy Allison
c3eb491c92 Removed NFS quotas code for Solaris as Alan wants to re-write it.
Jeremy.
(This used to be commit 13c9823eb1)
2001-03-27 08:08:04 +00:00
Jeremy Allison
303c152f03 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.
(This used to be commit 3d2c59bfe0)
2001-03-27 02:43:34 +00:00