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

1077 Commits

Author SHA1 Message Date
Jeremy Allison
0a40bc83e1 Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. Merged
in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open
problem.
Jeremy.
-
Jeremy Allison
f0d7867801 Fixed bug noticed by JF. se_access_check needs user SID as first in token.
Jeremy.
-
Jeremy Allison
1e719a8076 Fixed processing of dfree script (was truncating).
Jeremy.
-
Tim Potter
806185ca8c Compile fix for new arg to create_nt_token() -
Jeremy Allison
27d72ed1cf Removed the special casing of SIDs in se_access_check. This is now done (correctly)
when the NT_USER_TOKEN is *created*.
Jeremy.
-
Jeremy Allison
e18c104ee3 Sorry Gerald, I think the original code was better (plus safer as I'm sure
it's working :-).
Jeremy.
-
Jeremy Allison
ebf754400f Extra part of fix that Gerald missed (sorry).
Jeremy.
-
Gerald Carter
8938dc1831 subtle bug where files which missed the stat_cache but were added
to the cache during the look returned a blank stat struct.  Made
weird occurrences such as...

   $ smbclient //pogo/print$
   smb:\ > cd w32x86
     ERROR: Invalid path
   smb:\ > cd w32x86

   smb:\w32x86\ >
-
Jeremy Allison
bcf0a5c316 Fix for short names not being returned correctly with non-mangled shares.
Jeremy.
-
Jeremy Allison
7eb7241442 Fixed very subtle bug returning correct error on an open, when we have
a choice of invalid share mode and access denied. We must return the
access denied by preference, but also remember to break the oplocks...
This is needed for multi-user MS-Access.
Jeremy.
-
Jeremy Allison
e6a1a1e444 Fixed compiler warning.
Jeremy.
-
Jeremy Allison
f4c32a75e6 Added OLD_NTDOMAIN to remove warnings about undefined functions.
Jeremy.
-
Jeremy Allison
63e2ebc427 Removed unused auto (IRIX compiler warning).
Jeremy.
-
Jeremy Allison
7055fa0bc4 Fixed *very* subtle statcache bug where invalid stat state could be
being used if last component lookup failed, but was found in the directory
scan.
Jeremy.
-
Jeremy Allison
e9f48c9cec Fixed bug with Win9x/ME where drivername was being returned incorrectly in
one printq case. Now goes though common function.
Jeremy.
-
Jeremy Allison
76b8dd376d file_lines_load/file_lines_pload can now optionally convert unix_to_dos()
on read.
Jeremy.
-
Jeremy Allison
6ae63e502e Working code to read POSIX ACLs on a Linux system using the bestbits
ACL patch from http://acl.bestbits.at/.
configure support needs more work (just assumes correct headers at
the moment). ACL writing needs adding.
Jeremy.
-
Jeremy Allison
4339e20202 Cause smbd to use the new posix_acls code, not the old unix_acls code.
Currently does exactly the same thing (returns ACLs the same way). This
code is written to try and get a POSIX ACL via the abstract sys_XX interface,
then fall back to providing a UNIX based ACL if the calls fail. Seems to
work. Next step is to add a --with-posix-acls to configure.in and then
check on a POSIX ACL system that a complex ACL is returned correctly
as an NT ACL. Note that the ACL set (a more complex problem) is not
addressed yet.
Jeremy.
-
Tim Potter
447fbb38a8 Print debug if domain_client_validate() cannot fetch the trust account
password (say for example if the tdb file format has changed).  (-:
-
Jeremy Allison
8359375bba Make smbd/posix_acls.c use abstract interface.
include/smb_acls.h lib/sysacls.c: Added as interface definitions.
Jeremy.
-
Tim Potter
5e81151e53 Fixed compiler warning. -
Jeremy Allison
b27cac7762 Moving to abstract API interface (sys_get_acl() etc.) to allow system
specific ACL calls to be dealt with elsewhere. This file will eventually
be able to replace the old UNIX acl interface.
Jeremy.
-
David O'Neill
80c192244f Remove C++ style comments -
Jeremy Allison
52e9311bc2 Code to read & return POSIX ACLs as NT ACLs. Close to test on Linux.
Jeremy.
-
Jeremy Allison
8f0062b873 Keep syncing up POSIX ACL work...
Jeremy.
-
Jeremy Allison
bcac4ede76 Work in progress, doesn't compile. Adding the POSIX ACL mapping....
Jeremy.
-
Jeremy Allison
346f2f9206 include/dlinklist.h: Added '{' '}' around DLIST_PROMOTE so it can be used as a single
statement after an 'if'. Tracking this down took 4 hours from my life and ANDREW I WANT
THEM BACK !!!!! :-).
include/smb.h smbd/password.c: Fixed the bug veritas reported with realloc of the validated_users
array growing without bounds. This is now a linked list as god (Andrew) intended :-).
Jeremy.
-
Jeremy Allison
8f3332a9ac passdb/secrets.c passdb/smbpassfile.c smbd/server.c : Actually *use* the code
written to transition from an old DOMAIN.MACHINE.MAC file to secrets.tdb.
printing/nt_printing.c: Fix case insensitive name lookups for driver files.
John - this should fix the Win9x/WinME problem correctly.
Jeremy.
-
Jeremy Allison
349d58fb57 Fixed messaging so main smbd can get lib/message.c messages.
Jeremy.
-
Jeremy Allison
2a797f9aa2 Removed unnessesary init.
Jeremy.
-
Jeremy Allison
a08b08f778 This should fix Office failing to print to "FILE:".
Jeremy.
-
Jeremy Allison
e041b144b2 Free talloc'ed memory from the main smbd. Patch from Rich Bollinger, Elliott Company
Jeremy.
-
Jeremy Allison
00cd72c385 Don't forget to convert into UNIX character set before calling
winbindd.
Jeremy.
-
Gerald Carter
445fd1dbd8 combined 2 if statments which used the same condition
-- jerry
-
Jeremy Allison
63cafb34b3 Fix for off-by-one StrnCpy.
Jeremy.
-
Jeremy Allison
78a1307445 Fix for updating of print queues changed from a local box. Essentially,
this makes sure that the change messages sent to ourselves are handled
synchronously w.r.t. other smb packets incoming.
Jeremy.
-
Andrew Tridgell
209e20365e we don't need the separate lp_status() connection records any more -
Andrew Tridgell
3575ad1098 fixed the problem with messages not getting through
the problem had nothing to do with being your own pid, it was instead
a problem with IPC$ connections not being registered in the
connections database and an incorrect test for -1 in the messaging
code.

These changes also mean that IPC$ shares now show up in
smbstatus. That is probably a good thing.
-
Jeremy Allison
f571e1efd0 Fix from Jim McDonough @ IBM for OS/2 clients.
Jeremy.
-
Jeremy Allison
213cd0b519 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.
-
Jeremy Allison
cdbd2e9977 Merge from appliance head of JR's changes for driver versioning.
Jeremy.
-
Gerald Carter
0b92d0838e Large commit which restructures the local password storage API.
Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+)
are broken, but they were somewhat broken before. :)

The following functions implement the storage manipulation interface

/*The following definitions come from  passdb/pdb_smbpasswd.c  */

BOOL pdb_setsampwent (BOOL update);
void pdb_endsampwent (void);
SAM_ACCOUNT* pdb_getsampwent (void);
SAM_ACCOUNT* pdb_getsampwnam (char *username);
SAM_ACCOUNT* pdb_getsampwuid (uid_t uid);
SAM_ACCOUNT* pdb_getsampwrid (uint32 rid);
BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass);
BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override);
BOOL pdb_delete_sam_account (char* username);

There is also a host of pdb_set..() and pdb_get..() functions for
manipulating SAM_ACCOUNT struct members.  Note that the struct
passdb_ops {} has gone away.  Also notice that struct smb_passwd
(formally in smb.h) has been moved to passdb/pdb_smbpasswd.c
and is not accessed outisde of static internal functions in this
file.  All local password searches should make use of the the SAM_ACCOUNT
struct and the previously mentioned functions.

I'll write some documentation for this later.  The next step is to fix
the TDB passdb backend, then work on spliting the backends out into
share libraries, and finally get the LDAP backend going.

What works and may not:

	o domain logons from Win9x 	works
	o domain logons from WinNT 4	works
	o user and group enumeration
		as implemented by Tim	works
	o file and print access		works
	o changing password from
		Win9x & NT		ummm...i'll fix this tonight :)

If I broke anything else, just yell and I'll fix it.  I think it
should be fairly quite.





-- jerry
-
Tim Potter
18fa724a79 More merging of printing stuff from appliance. -
Jeremy Allison
d0fbb4f5d9 Added a VFS version return to init call. Allows smbd to fail an init if
versions don't match.
Jeremy.
-
Jeremy Allison
f0dcc39d34 Fix for admin user being ignored.
Jeremy.
-
Jeremy Allison
d5be2334d4 Call standard_sub_advanced() after lp_logon_XX() calls.
Jeremy.
-
Jeremy Allison
b809a2d0c8 David Lee's utmp patch (finally). Thanks David !
Jeremy.
-
Jeremy Allison
521f09829f Sorry JF - no billable hours :-). I fixed the "stream of events" problem
with PCL drivers. The problem was we were updating the changeid on every
SETPRINTERDATA/DELETEPRINTERDATA call. We should not do this, we should
just update the 'setprinter' called count. We update the changeid on calls
to SETPRINTER/ADDPRINTER/ADDPRINTEREX etc. Also fixed the correct returning
of the create time on printers.
Jeremy.
-
Jeremy Allison
979aa01e01 Fix for vfs_fstat() crash with new stat code.
Jeremy.
-
Jeremy Allison
66a5c05ec4 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.
-