1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

955 Commits

Author SHA1 Message Date
Jeremy Allison
276364e2a4 Removed the special casing of SIDs in se_access_check. This is now done (correctly)
when the NT_USER_TOKEN is *created*.
Jeremy.
(This used to be commit 27d72ed1cf8ece2bede812341279ba5a7262ace4)
2000-12-12 02:36:14 +00:00
Andrew Tridgell
0961ed2b56 new prototypes
(This used to be commit 2258a62365e6fa3f08fd3b911e13b391515eaa46)
2000-12-11 00:10:06 +00:00
Tim Potter
3478427f2e Port of lsa_lookup_sids() and lsa_lookup_names() rpc client functions from
TNG branch.

Re-instated lsa_lookup_sids and lsa_lookup_names functions in rpcclient.

This requires most samba binaries to link in another handful of object
files due to uncessary coupling between modules.  )-:
(This used to be commit 817819d0cc3ecf642be5a1656be3b71bed260ee4)
2000-12-08 03:34:00 +00:00
Jeremy Allison
cf5b71994d file_lines_load/file_lines_pload can now optionally convert unix_to_dos()
on read.
Jeremy.
(This used to be commit 76b8dd376d13eb4469417be217c966d54d333367)
2000-12-07 19:26:04 +00:00
Jeremy Allison
423227d7ca 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.
(This used to be commit 6ae63e502e6adf3666a34aa87860c74e106fdb84)
2000-12-07 05:38:01 +00:00
Jeremy Allison
70922b9bbe 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.
(This used to be commit 4339e20202a876dbadc07980b731f711463b7299)
2000-12-06 23:24:31 +00:00
Tim Potter
bd54bcb397 make proto again
(This used to be commit 746e03dce81429b9a06ce95929eb605cf5b0833d)
2000-12-06 02:55:08 +00:00
Tim Potter
a58ca91245 tdb_unlockchain() no longer returns a value
(This used to be commit aee52c7acf138f8fd651aeb3d9bef79f99d1a2a9)
2000-12-06 02:51:13 +00:00
Jeremy Allison
7e4c4721b4 Changed to sourceforge tdb code. This includes spinlocks (so we now have
a --with-spinlocks option to configure, this does mean the on-disk tdb
format has changed, so 2.2alphaX sites will need to re-create their
tdb's. The upside is no more tdb fragmentation and a +5% on netbench.
Swings and roundabouts....
Jeremy.
(This used to be commit 9dea7b7c257db487f8ced7dad3fce92fba03ea91)
2000-12-06 00:05:15 +00:00
Andrew Tridgell
d931013008 pass the desired access into cli_nt_create()
(This used to be commit a2d07994e0376a8d530d262573c96710bdff2236)
2000-12-04 07:26:56 +00:00
Andrew Tridgell
af4649bdf3 new proto
(This used to be commit 27c676cb3b43344ce4ceb167322c98027b9c1e4e)
2000-12-04 02:01:12 +00:00
Andrew Tridgell
efcb07a0dd new protos
(This used to be commit 0a990f02d0e25c0f854d6caa3e9c3bc7329697c7)
2000-12-03 11:05:30 +00:00
Andrew Tridgell
856816754d new proto
(This used to be commit 2f21a0b10007056d0c359a0edb869f47c897ee7c)
2000-12-03 02:20:33 +00:00
Jeremy Allison
0f1c800f85 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.
(This used to be commit 8f3332a9acf413ac5d12053ca5c52733a4e946cc)
2000-11-27 23:59:42 +00:00
Gerald Carter
eb2f9f8c92 make proto
(This used to be commit e0a02249d394a530d911d9b650c6eb56c188a6d8)
2000-11-21 06:01:53 +00:00
Jeremy Allison
475fb713a9 Fix for memory leak when adding driver.
Jeremy.
(This used to be commit eeab4e0290f9df84025e91c85d27b21e0c02781f)
2000-11-17 02:22:35 +00:00
Jeremy Allison
cdac09614e Fix for a problem with the new messaging system. If a sender is using the
messaging system as a notification mechanism, and the speed of notification
greatly exceeds the speed of message recovery, then you get a massively (>75Mb)
growing tdb. If the message is a simple notification, then the message is
static, and you only need one of them in transit to a target process at
any one time.
This patch adds a BOOL "allow_duplicates" to the message_send_XX primitives.
If set to False, then before sending a message the sender checks the existing
message queue for a target pid for a duplicate of this message, and doesn't
add to it if one already exists.
Also added code into msgtest.c to test this.
Jeremy.
(This used to be commit 3aa7995660395ecb85c8e35b638fa9fbbb952558)
2000-11-16 21:38:24 +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
4bce271e4f Merge from appliance head of JR's changes for driver versioning.
Jeremy.
(This used to be commit cdbd2e99775642dc2e92004be9014bf38a92d80f)
2000-11-14 21:56:32 +00:00
David O'Neill
47dc568a3b - fix "declaration of 'time' shadows global declaration" warning.
(This used to be commit 92ff07132b3834b469ad7bb73d6e714b175a12af)
2000-11-14 15:50:30 +00:00
Gerald Carter
9fede0dc0d 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
(This used to be commit 0b92d0838ebdbe24f34f17e313ecbf61a0301389)
2000-11-13 23:03:34 +00:00
Tim Potter
29cb8c12ca make proto
(This used to be commit 88a2d224f1c3ca09abbad7f33b0e93bdf503da4e)
2000-11-08 00:19:30 +00:00
Tim Potter
e5225bfc6b make proto
(This used to be commit 6ced1bb8b92101e11c53467d0380a97b840de7c7)
2000-11-07 17:48:54 +00:00
Tim Potter
80dcdd1cf4 proto.h was out of date.
(This used to be commit 63e4f629163babc1dcba8a419ae432057e46f6f8)
2000-10-29 23:52:21 +00:00
Jeremy Allison
1cb444057a David Lee's utmp patch (finally). Thanks David !
Jeremy.
(This used to be commit b809a2d0c81c54e917ccc0c99b3e70ea8d7ceab1)
2000-10-28 19:38:39 +00:00
Jeremy Allison
9a8749d33a Added John Reillys patch for error code returns from clean_up_printer_driver_strunct()
calls.
Jeremy.
(This used to be commit f81a2a03bf435e65e7484ab021f86a8a4f62b656)
2000-10-26 22:09:22 +00:00
Jeremy Allison
b5ac72cc64 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.
(This used to be commit 521f09829fd329f87b3d19e8871e2b989c98a58e)
2000-10-26 21:43:13 +00:00
Gerald Carter
01e0d3879e TDB password backend support written by Simo Sorce <simo.sorce@polimi.it>
Marked as an experimental compile time option (defaults to off) for now.





jerry
(This used to be commit 0435af4417b876c2ea1dd4591ae7647784c28e30)
2000-10-26 03:31:41 +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
Jean-François Micouleau
85643cd72c last part of W2K support.
the trust domain list reply on netlogon pipe was wrong, interim hack until
we have full trust relationships.

changed some unistr2 to parse the ending NULL char.

added a prs_align_needed() function. much like a prs_align but with a
condition. needed for the unistr2 parsing.

	J.F.
(This used to be commit d8bf81553c17d9ee3419d8150b96119ebb0b8fa9)
2000-10-13 14:02:01 +00:00
Jeremy Allison
330d678fba Fix to allow smbd to call winbindd if it is running for all group enumeration,
falling back to the UNIX calls on error. This should fix all problems with
smbd enumerating all users in all groups in all trusted domains via winbindd.
Also changed GETDC to query 1C name rather than 1b name as only the PDC
registers 1b.
Jeremy.
(This used to be commit 5b0038a2afd8abbd6fd4a58f5477a40d1926d498)
2000-10-13 01:59:14 +00:00
Jeremy Allison
26a4a34d36 Fix for growing printing.tdb by adding check on job creation.
This also updates the printing.tdb db version to 2.
Jeremy.
(This used to be commit 13395514c632341e7be36eb9589011bb0949b075)
2000-10-11 02:26:27 +00:00
Jeremy Allison
e9270d61fc Remove lpq as root fix - do this in print_job_start instead
as part of print queue length processing.
Jeremy.
(This used to be commit e85a0fadd8dcf608822819f00f15569713518806)
2000-10-11 02:04:46 +00:00
Jeremy Allison
cdb71ca518 Fixes to periodically scan printing.tdb in idle time and occasionally
on exit. Needed to fix printing.tdb from groving to 300Mb+ if being
driven by smbclient clients that never ask for status... (effective
DOS attack :-).
Jeremy.
(This used to be commit 6581066b93a674fadf6f9b92441428d2cc8b4a02)
2000-10-10 21:52:31 +00:00
Jean-François Micouleau
11d999f2bc a netlogon enum trust query doesn't have a function_code at end.
a sam_user_info_24 doesn't have a uint16 at end
samr_create_user also creates the unix account now
samr_set_userinfo changes the password.

        J.F.
(This used to be commit 94f4024481fcd0cb6647af1bd4364033be020641)
2000-10-10 13:08:55 +00:00
Andrew Tridgell
2d33e87424 got rid of tdb_writelock() and instead lock a chain. tdb_writelock()
is conceptually flawed
(This used to be commit 6e4a3585521b7e5928298bd0f1418ff9fbcacfb4)
2000-10-10 06:45:09 +00:00
Jean-François Micouleau
75c346e70c added samr_set_user_info and info_2.
cleanup of create_user
cleanup of rid/sid mix in samr. now we only have sid.

some prs_align() missing in parse_samr.c

a small debug change in srv_pipe.c

You still can't change a user's password in this commit.
Will be availble in the next one.

	J.F.
(This used to be commit b655bc281fa183b1827a946ada1fcf500fb93aea)
2000-10-07 15:56:36 +00:00
Jeremy Allison
077c41cc60 Fix for printf attribute from Mattias Gronlund <Mattias.Gronlund@sa.erisoft.se>
Added "codepage directory" patch from Peter.Polkinghorne@brunel.ac.uk
Jeremy.
(This used to be commit e49566c2e21fcd16980e5110495645c5ae5a36da)
2000-10-06 23:35:55 +00:00
Jeremy Allison
74d4a3b741 Added Herb's fixes to HEAD.
Jeremy.
(This used to be commit 4862d2ab1163310d844b929fb17239b4f4cb1a99)
2000-10-06 23:01:47 +00:00
Jeremy Allison
1126775808 Proto update. Also fix from John Reilly @ HP for not showing APW with W2K.
Jeremy.
(This used to be commit 698288cb9de316527c0c2a271e18c920578f9930)
2000-10-06 20:03:17 +00:00
Jeremy Allison
ba00796e6d Herb's warning fixes. Also the POSIX locking fix.
We now use our own vfs layer to do get/set acl calls (hurrah!).
Jeremy.
(This used to be commit dfe77c7046cbd65ee52aea7439f21503c1eac41d)
2000-10-06 18:13:52 +00:00
Jeremy Allison
14a8906e8c Inlined many of the vfs_XXX calls as macros for speed.
Jeremy.
(This used to be commit 0811d080abd374f47c7c3c8a1ef007e443e5b79c)
2000-10-06 03:41:48 +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
bbd7f7bf0f Herb's fixes for profiling & compiler warnings.
Jeremy.
(This used to be commit 7914e9351abb5271ebb4990c3b1fe495d15a4eda)
2000-10-05 18:50:18 +00:00
Jean-François Micouleau
fde7328900 someone forgot to update proto.h :-)
J.F.
(This used to be commit 3664e80fcd292ee8ba20861b01945d7db59858a9)
2000-10-05 12:43:37 +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
Jeremy Allison
2679fa315d Memleak fix for cache code.
Jeremy.
(This used to be commit 1ebe54666b0fc6f224f17036063dfe0ef7ec9147)
2000-10-02 21:03:46 +00:00
Andrew Tridgell
910e8a5c9c new prototypes
(This used to be commit 3e77bf2117c43d3202774df24debc91f61d88733)
2000-09-29 04:47:18 +00:00
Jeremy Allison
b43b2e4f8a Restructuring of the code to remove dos_ChDir/dos_GetWd and re-vector them
through the VFS. All file access/directory access code in smbd should now
go via the vfs. Added vfs_chown/vfs_chmod calls. Still looking at vfs_get_nt_acl()
vfs_set_nt_acl() call API design.
Jeremy.
(This used to be commit f96625ec124adb6e110dc54632e006b3620a962b)
2000-09-27 19:09:59 +00:00
Jean-François Micouleau
8c93ddf3e0 samr unknown 0x32 is in fact samr create user.
so renamed and tidy up of the server function.

	J.F.
(This used to be commit 0f707ac1fb5685b800d6599b9074ec1d4e65b1c1)
2000-09-27 13:02:57 +00:00