1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
Commit Graph

1082 Commits

Author SHA1 Message Date
Jeremy Allison
c25533de99 Fixed bug found by Gerald. If a Samba server joins a domain and is set
to search for a DC to authenticate to using the "*" syntax than ensure
that for the first hour after the password change is searches for the
PDC using the 1B name not the 1C name as domain replication may not
have occured.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0f39895ab0 Split set_nt_acls into owner set (which uses chown) and permission set
(which currently uses chmod) in preparation for ACL creation.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1a31b4eb08 Split the one sys_acl_free call into sys_acl_free_TYPE calls, to allow
easier wrapping of non-POSIX ACL interfaces.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
c48e95297e Fix typos in new group sid check.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
43ca0d991c Fixed chown/chgrp setting from smbcacls.
Jeremy.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f0d7867801 Fixed bug noticed by JF. se_access_check needs user SID as first in token.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1e719a8076 Fixed processing of dfree script (was truncating).
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
806185ca8c Compile fix for new arg to create_nt_token() 0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e18c104ee3 Sorry Gerald, I think the original code was better (plus safer as I'm sure
it's working :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
ebf754400f Extra part of fix that Gerald missed (sorry).
Jeremy.
0001-01-01 00:00:00 +00:00
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\ >
0001-01-01 00:00:00 +00:00
Jeremy Allison
bcf0a5c316 Fix for short names not being returned correctly with non-mangled shares.
Jeremy.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e6a1a1e444 Fixed compiler warning.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f4c32a75e6 Added OLD_NTDOMAIN to remove warnings about undefined functions.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
63e2ebc427 Removed unused auto (IRIX compiler warning).
Jeremy.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e9f48c9cec Fixed bug with Win9x/ME where drivername was being returned incorrectly in
one printq case. Now goes though common function.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
76b8dd376d file_lines_load/file_lines_pload can now optionally convert unix_to_dos()
on read.
Jeremy.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
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).  (-:
0001-01-01 00:00:00 +00:00
Jeremy Allison
8359375bba Make smbd/posix_acls.c use abstract interface.
include/smb_acls.h lib/sysacls.c: Added as interface definitions.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
5e81151e53 Fixed compiler warning. 0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
David O'Neill
80c192244f Remove C++ style comments 0001-01-01 00:00:00 +00:00
Jeremy Allison
52e9311bc2 Code to read & return POSIX ACLs as NT ACLs. Close to test on Linux.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
8f0062b873 Keep syncing up POSIX ACL work...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
bcac4ede76 Work in progress, doesn't compile. Adding the POSIX ACL mapping....
Jeremy.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
349d58fb57 Fixed messaging so main smbd can get lib/message.c messages.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
2a797f9aa2 Removed unnessesary init.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
a08b08f778 This should fix Office failing to print to "FILE:".
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e041b144b2 Free talloc'ed memory from the main smbd. Patch from Rich Bollinger, Elliott Company
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
00cd72c385 Don't forget to convert into UNIX character set before calling
winbindd.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
445fd1dbd8 combined 2 if statments which used the same condition
-- jerry
0001-01-01 00:00:00 +00:00
Jeremy Allison
63cafb34b3 Fix for off-by-one StrnCpy.
Jeremy.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
209e20365e we don't need the separate lp_status() connection records any more 0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f571e1efd0 Fix from Jim McDonough @ IBM for OS/2 clients.
Jeremy.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
cdbd2e9977 Merge from appliance head of JR's changes for driver versioning.
Jeremy.
0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Tim Potter
18fa724a79 More merging of printing stuff from appliance. 0001-01-01 00:00:00 +00:00
Jeremy Allison
d0fbb4f5d9 Added a VFS version return to init call. Allows smbd to fail an init if
versions don't match.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f0dcc39d34 Fix for admin user being ignored.
Jeremy.
0001-01-01 00:00:00 +00:00