1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

1633 Commits

Author SHA1 Message Date
Jeremy Allison
4178f211d1 debug statement fixups.
Merge SAFE_FREE fix in tdb from 2.2, and IRIX fix.
Jeremy.
(This used to be commit eb6607466565bcd5b3800492d0bc1ae8a44da4f6)
2002-01-02 23:28:55 +00:00
Andrew Bartlett
a3f891dbd2 Actually enforce the passdb API.
Thou shalt not reference SAM_ACCOUNT members directly - always use
pdb_get/pdb_set.

This is achived by making the whole of SAM_ACCOUNT have a .private member,
where the real members live.  This caught a pile of examples, and these have
beeen fixed.

The pdb_get..() functions are 'const' (have been for some time) and this
required a few small changes to constify other functions.

I've also added some debugs to the pdb get and set, they can be removed if
requested.

I've rewritten the copy_id2x_to_sam_pass() functions to use the new passdb
interface, but I need the flags info to do it properly.

The pdb_free_sam() funciton now blanks out the LM and NT hashes, and as such
I have removed many extra 'samr_clear_sam_passwd(smbpass)' calls as a result.

Finally, any and all testing is always appriciated - but the basics seem to
work.

Andrew Bartlett
(This used to be commit d3dd28f6c443187b8d820d5a39c7c5b3be2fa95c)
2002-01-02 07:41:54 +00:00
Andrew Bartlett
4a6d1318bd A farily large commit:
- Move rpc_client/cli_trust.c to smbd/change_trust_pw.c
  - It hasn't been used by anything else since smbpasswd lost its -j

 - Add a TALLOC_CTX to the auth subsytem.  These are only valid for the length
   of the calls to the individual modules, if you want a longer context hide it
   in your private data.

   Similarly, all returns (like the server_info) should still be malloced.

 - Move the 'ntdomain' module (security=domain in oldspeak) over to use the new
   libsmb domain logon code.  Also rework much of the code to use some better
   helper functions for the connection - getting us much better error returns
   (the new code is NTSTATUS).

   The only remaining thing to do is to figure out if tpot's 0xdead 0xbeef for
   the LUID feilds is sufficient, or if we should do random LUIDs as per the old
   code.

   Similarly, I'll move winbind over to this when I get a chance.

This leaves the SPOOLSS code and some cli_pipe code as the only stuff still in
rpc_client, at least as far as smbd is concerned.

While I've given this a basic rundown, any testing is as always appriciated.

Andrew Bartlett
(This used to be commit d870edce76ecca259230fbdbdacd0c86793b4837)
2002-01-01 03:10:32 +00:00
Andrew Tridgell
eb4e101153 - portablitity fixes for cc -64 on irix
- fixed gid* bug in rpc_server
(This used to be commit 48aa90c48c5f0e3054c4acdc49668e222e7c0d36)
2001-12-31 13:46:26 +00:00
Jeremy Allison
bb81e23e17 When running interactive we want to set our own process group for
signal management.
Jeremy.
(This used to be commit fffae94dd5699f44c0b1c8081587deafd89b3fc0)
2001-12-30 01:46:38 +00:00
Jeremy Allison
0d6a1c0998 Fixup -i interactive modes.
Jeremy.
(This used to be commit 9343b613d3778b0330bc4d610d3befd363797360)
2001-12-29 21:13:53 +00:00
Simo Sorce
4fd97a7a03 passing NULL to print_queue_status()'s status parameter could end in a segfault
(This used to be commit 79254d2b0490ba400832ef6d460895d45cc4273f)
2001-12-29 09:52:24 +00:00
Gerald Carter
04aff47c71 moving SAM_ACCOUNT to include a bit field for initialized
members (such as uid and gid).  This way we will be able to
keep ourselves from writing out default smb.conf settings when
the admin doesn't want to,  That part is not done yet.

Tested compiles with ldap/tdb/smbpasswd.  Tested connection with smbpasswd
backend.

oh...and smbpasswd doesn'y automatically expire accounts after 21 days
from the last password change either now.  Just ifdef'd out that code
in build_sam_account().

Will merge updates into 2.2 as they are necessary.




jerry
(This used to be commit f0d43791157d8f04a13a07d029f203ad4384d317)
2001-12-27 06:38:04 +00:00
Martin Pool
bf65820af2 Add an output parameter to message_send_all that says how many
messages were sent, so you know how many replies to expect.

Const and doc religion.
(This used to be commit 22e510ea0d69356be4fd2fa5ad9e9f4e84f62337)
2001-12-21 00:37:49 +00:00
Andrew Tridgell
9eebd31e2c check for a winbindd username when doing a kerberos auth
(This used to be commit 39f2e2e1623a011e2c99ecca64e0643b1e450657)
2001-12-20 23:36:39 +00:00
Jeremy Allison
9ed10f83d7 Removed global debugf. Replaced with lp_set_logfile(name).
Fixed winbindd to finally stop leaving log. file droppings :-).
Jeremy.
(This used to be commit 0bea6cf79a44f79fa3a4f2c8381e898e79c66509)
2001-12-20 22:27:05 +00:00
Andrew Tridgell
01a382480a don't use server_info after its been freed
(This used to be commit ee161a57289409e2fa43e33b045473077c7b6ba5)
2001-12-20 09:32:03 +00:00
Andrew Tridgell
1a242b6fd9 support "map to guest" with spnego
(This used to be commit e873d0ff1eee9442ff6152d666b8d874b6a01972)
2001-12-20 09:06:53 +00:00
Andrew Tridgell
2838f61540 fixed long filenames on win98
the fstype must not be null terminated or win98 doesn't recognise it
(This used to be commit c8a040f2aa733e926280af010513849b6406741d)
2001-12-20 06:52:45 +00:00
Tim Potter
367c40fd87 Grr - numbers printed in hexadecimal should be preceeded by 0x
(This used to be commit 7d8082a8ad7d5de5daf653903efd36fb84b3cedc)
2001-12-20 05:10:50 +00:00
Jeremy Allison
a784fce109 Allow ACL set to fail gracefully on HP HFS filesystems.
Jeremy.
(This used to be commit 2d7b81e692ac2bcfd6e31223d3f8545c255cb47c)
2001-12-19 17:47:19 +00:00
Andrew Tridgell
9126a40e2c added trusted realm support to ADS authentication
the method used for checking if a domain is a trusted domain is very
crude, we should really call a backend fn of some sort. For now I'm
using winbindd to do the dirty work.
(This used to be commit adf44a9bd0d997ba4dcfadc564a29149531525af)
2001-12-19 09:53:30 +00:00
Jeremy Allison
ed611ffe1a Tidyup utmp code to cope with hostname = NULL.
Jeremy
(This used to be commit 2a1b531a1c4f1a4772c95c867f35eac50ed1c7fa)
2001-12-18 08:19:02 +00:00
Jeremy Allison
2a6eeff2a7 Return NT_STATUS_OBJECT_NOT_FOUND or ERRbadpipe if pipe name not found.
Jeremy.
(This used to be commit d5fdb1f096e8db3e9cf7a65ddb75f7cafd1958c0)
2001-12-18 02:09:57 +00:00
Jeremy Allison
0558e2c402 Fixed the bug with descending into mangled directories.
The problem is that name_map_mangle can *change* the length of a patchname.
Ensure that all the character pointer messing about can cope with changing
sizes of components. This code is too ugly to live.....
This also needs *lots* of testing.
Jeremy.
(This used to be commit 9f2b6a07429da5dec59e562fa5489b8079978677)
2001-12-18 01:26:54 +00:00
Jeremy Allison
02c3dcd8ee Made "hide unreadable" work much more reliably (just for Volker :-).
Jeremy.
(This used to be commit f6d6825bc86662d54ff3920d7d5390d151f34b0f)
2001-12-17 19:16:22 +00:00
Andrew Tridgell
ed5db6cc45 removed unused variable
(This used to be commit bed269e6d4dc4c9622ec37f9a7e9e2b4dbbaee24)
2001-12-17 11:13:03 +00:00
Jeremy Allison
28df80cf68 Moved fchown_acl change to the point where we *really* know if we
created the file or not.
Jeremy.
(This used to be commit 32dffa0ba792a81d89d06b527d82820b89507efd)
2001-12-16 23:44:38 +00:00
Jeremy Allison
0fd94a5c4b Ensured filetimes set (by name) after close. Ignore errors. This is the
correct way to ensure times set in 'pending modtime' and 'time close'
are always set correctly. Inspired by patch from Juergen Hasch.
Jeremy.
(This used to be commit 24053858543fa6c22c0c3222570109fbfdabab9e)
2001-12-16 21:04:19 +00:00
Jeremy Allison
079a02b15e Patch for string legths from TAKAHASHI, Motonobu(monyo).
Jeremy.
(This used to be commit f0d8b7573fc74004131ba0a82dbd5e0007a524bf)
2001-12-13 23:43:15 +00:00
Herb Lewis
e4553718bb add *.po32 to ignore list
(This used to be commit fe0db4c55f8bfc70004edd60a29359337fa40723)
2001-12-12 16:04:37 +00:00
Andrew Tridgell
216f3ae908 cleanup a little namespace pollution
(This used to be commit e5b484451a37a9ac940b342d70791b09362070ee)
2001-12-10 03:21:38 +00:00
Andrew Bartlett
9220fd730c Ensure that 'use spnego' restricts, rather than just advises our clients.
This means that if a hole is found in the spnego code, we can tell people
to just set 'use spengo' in their config file while we sort it out.

Other than that, preventing 'unusual' behaviour is always a good thing.

Andrew Bartlett
(This used to be commit a8a53c08f7d607268a3959486a850a2df50ca7a2)
2001-12-08 02:12:17 +00:00
Andrew Tridgell
99c431695c added a "use spnego" option
you need to set "use spnego = no" for w2k to be able to join a samba
domain. Otherwise the w2k box will assume we can do kerberos as a KDC
(This used to be commit b5cb57a367a6d9a82e082e2838e83e0997eb4930)
2001-12-07 01:01:10 +00:00
Jean-François Micouleau
e0066d2dd4 again an intrusive patch:
- removed the ugly as hell sam_logon_in_ssb variable, I changed a bit the
definition of standard_sub_basic() to cope with that.

- removed the smb.conf: 'domain admin group' and 'domain guest group'
parameters ! We're not playing anymore with the user's group RIDs !

- in get_domain_user_groups(), if the user's gid is a group, put it first
in the group RID list.

I just have to write an HOWTO now ;-)

        J.F.
(This used to be commit fef52c4b96c987115fb1818c00c2352c67790e50)
2001-12-06 13:09:15 +00:00
Andrew Bartlett
3f387d1971 Ensure we fill in the %U for NTLMSSP connections
(This used to be commit d15ea4fa8e23469f104405c197206e2779461323)
2001-12-05 10:50:26 +00:00
Andrew Tridgell
9421ad4a7a added a REALLY gross hack into kerberos_kinit_password so that
winbindd can do a kinit
this will be removed once we have code that gets a tgt
and puts it in a place where cyrus-sasl can see it
(This used to be commit 7d94f1b7365215a020d3678d03d820a7d086174f)
2001-12-05 09:46:53 +00:00
Herb Lewis
61fc7b98a7 Merge from 2.2
If you do not have one more expect than issue when talking to the passwd
program you will not send the last issue.
(This used to be commit 8aafec95cba0e8a002d20c4c0055a01690879f7a)
2001-12-04 22:24:17 +00:00
Jean-François Micouleau
922eb763d7 added a boolean to the group mapping functions to specify if we need or
not the privileges. Usually we don't need them, so the memory is free
early.

lib/util_sid.c: added some helper functions to check an SID.

passdb/passdb.c: renamed local_lookup_rid() to local_lookup_sid() and pass
an RID all the way. If the group doesn't exist on the domain SID,
don't return a faked one as it can collide with a builtin one. Some rpc
structures have been badly designed, they return only rids and force the
client to do subsequent lsa_lookup_sid() on the domain sid and the builtin
sid !

rpc_server/srv_util.c: wrote a new version of get_domain_user_groups().
Only the samr code uses it atm. It uses the group mapping code instead of
a bloody hard coded crap. The netlogon code will use it too, but I have to
do some test first.

	J.F.
(This used to be commit 6c87e96149101995b7d049657d5c26eefef37d8c)
2001-12-04 21:53:47 +00:00
Jeremy Allison
3667377851 Stop using getgrgid() - a very expensive call with winbindd, to look up
a group name.
Jeremy.
(This used to be commit b926660e73d4c94c30ec5a365027770acdafe25e)
2001-12-04 03:59:18 +00:00
Jeremy Allison
8e99888e7b Moved name_is_local to the correct place. Ooops.
Jeremy.
(This used to be commit 708c0a8d16ca86439e451def5f8d37f600ff15f1)
2001-12-04 03:47:44 +00:00
Jeremy Allison
c2e3d8ba01 Tidyup of lib/username. Add name_is_local fn to determine if name is
winbindd. Getting ready for efficiency fix in group lookups.
Jeremy.
(This used to be commit 8d41dfd149625e8ac53ab5e90a96e9a2daf9a629)
2001-12-04 02:58:22 +00:00
Jean-François Micouleau
cdf9b42754 added a tdb to store the account policy informations.
You can change them with either usermanager->policies->account
or from a command prompt on NT/W2K: net accounts /domain

we can add a rpc accounts to the net command. As the net_rpc.c is still
empty, I did not start. How should I add command to it ? Should I take the
rpcclient/cmd_xxx functions and call them from there ?

alse changed the SAM_UNK_INFO_3 parser, it's an NTTIME. This one is more
for jeremy ;-)

        J.F.
(This used to be commit bc28a8eebd9245ce3004ae4b1a359db51f77bf21)
2001-12-03 17:14:23 +00:00
Jeremy Allison
a9750b2006 XFS quota patch for Linux.
Jeremy.
(This used to be commit ce099faf6ce07e14bd9610960bd09f56c5bee864)
2001-11-30 21:50:02 +00:00
Tim Potter
6d9adfe73c Renamed sid field in SEC_ACE to trustee to be more in line with MS's
definitions.
(This used to be commit 9712d3f15a47155f558d0034ef71fd06afb11301)
2001-11-30 01:04:15 +00:00
Andrew Bartlett
fe64484824 Make better use of the ads_init() function to get the kerberos relam etc.
This allows us to use automagically obtained values in future, and the value
from krb5.conf now.

Also fix mem leaks etc.

Andrew Bartlett
(This used to be commit 8f9ce717819235d98a1463f20ac659cb4b4ebbd2)
2001-11-29 06:21:56 +00:00
Andrew Tridgell
f6b962fba3 fixed some krb5 ifdefs
(This used to be commit 23ef22f11700bbaa5778a9678a990a2b041fcefe)
2001-11-28 23:54:07 +00:00
Jeremy Allison
7d2d605f0d space -> tab.
Jeremy.
(This used to be commit c7dd0364f2b084d9a372ac885fd788bbb5113125)
2001-11-28 19:51:25 +00:00
Jeremy Allison
59a8827f5d Spelling pedents strike again :-).
Jeremy.
(This used to be commit 0187d4ba16c794faa372bf1a50261b8f47482064)
2001-11-28 18:10:13 +00:00
Jeremy Allison
a17867af97 Ensure the CAN_WRITE is checked and prevents O_CREAT and O_TRUNC from
being set. Also prevent an open on a file on a readonly share from
setting delete on close.
Jeremy.
(This used to be commit 1f3dcd99bdd36cd3ff492394e80c3e2037a9aa48)
2001-11-28 05:03:37 +00:00
Jeremy Allison
1a50b36d97 Re-added "Share modes" meaning don't allow deny mode conflict. Due to
user demand (don't talk to me about removing parameters.... :-).
Jeremy.
(This used to be commit b69127391b322d81cc648f73a601ed61e79c8a44)
2001-11-28 04:47:46 +00:00
Andrew Tridgell
5e25ba6fec always send an OID list until we handle raw (unwrapped) NTLMSSP
packets in session setup
(This used to be commit 3b3f8a935064811906cba221d386697e699af18c)
2001-11-27 23:41:14 +00:00
Jeremy Allison
01d91a8249 Fix for the logic bug wrt. existant oplocks. See long message
in samba-technical for explaination.
Jeremy.
(This used to be commit 8150f0f3f72957e77a1e6ca06760c87c516792eb)
2001-11-27 23:12:25 +00:00
Jeremy Allison
064b3e7da7 nsswitch/winbindd_group.c nsswitch/winbindd_user.c: formatting fixups.
smbd/open.c: Fix "delete on close" for directories.
Jeremy.
(This used to be commit 014b0973a3b3b9eb22cce3053171fa55f5c16a63)
2001-11-27 06:28:06 +00:00
Andrew Tridgell
67b3473780 fixed another memory leak
(This used to be commit 37aa2873e5f476a587316893b0ea3a6fbdfe746f)
2001-11-27 03:54:15 +00:00