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

71 Commits

Author SHA1 Message Date
Andrew Bartlett
132310b5bf r14494: Add comments to clarify that we deliberatly fall though here
Andrew Bartlett
(This used to be commit ead4087ac878d2317e5331fc9e12503994195a73)
2007-10-10 13:57:33 -05:00
Jelmer Vernooij
e3f2414cf9 r14380: Reduce the size of structs.h
(This used to be commit 1a16a6f1dfa66499af43a6b88b3ea69a6a75f1fe)
2007-10-10 13:57:16 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 122835876748a3eaf5e8d31ad1abddab9acb8781)
2007-10-10 13:52:24 -05:00
Jelmer Vernooij
c287cc247d r13851: More doc improvements.
(This used to be commit 936d26ae64b93ef8f8b2fbc632b1c2fd60840405)
2007-10-10 13:52:16 -05:00
Andrew Bartlett
1d95bcf3f8 r12816: Ugly hacks to the auth_unix code to make a SYSTEM token for root. If
we are going to try and have a 'real' NT token for these users, it is
going to get messy fast.  I want to go down the idmap road, but we
don't have the infrustucure for that yet.

Andrew Bartlett
(This used to be commit c90d5e82ff4836765f328b2acf20fd09ec91189b)
2007-10-10 13:50:00 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
2007-10-10 13:49:03 -05:00
Andrew Bartlett
a1827a1deb r12227: I realised that I wasn't yet seeing authenticated LDAP for the ldb
backend.

The idea is that every time we open an LDB, we can provide a
session_info and/or credentials.  This would allow any ldb to be remote
to LDAP.  We should also support provisioning to a authenticated ldap
server.

(They are separate so we can say authenticate as foo for remote, but
here we just want a token of SYSTEM).

Andrew Bartlett
(This used to be commit ae2f3a64ee0b07575624120db45299c65204210b)
2007-10-10 13:47:22 -05:00
Andrew Bartlett
f8a44902f4 r12058: Set an anonymous fallback, if the machine account isn't available.
Andrew Bartlett
(This used to be commit 55cb72f5cfe9a2c520c30e11ab34896588e91730)
2007-10-10 13:47:02 -05:00
Andrew Bartlett
0e476e7ce0 r11989: Rather than grabbing the machine account details at this point, grab
them 'later'.  We will need to handle the errors when we call the
get_* methods.

Andrew Bartlett
(This used to be commit c6e572f87022b57cdfd8178eb5c23df67a92c453)
2007-10-10 13:46:55 -05:00
Andrew Tridgell
516d0a97c9 r11969: got rid of the very annoying 'failed to open /secrets.tdb'
messages. As discussed with Andrew, this will soon be replaced with a
system that marks the credentials to use the machine accout from the
database rather than pre-loading the machine account details here.

The reason we got the annoying messages is this was being called
before smb.conf is loaded, so the code doesn't yet know the location
of the private directory
(This used to be commit 6aeb4bf3fe224a6f81962237bdda329ba828b493)
2007-10-10 13:46:52 -05:00
Andrew Bartlett
df9af34876 r11522: Add support for delegated credentials and machine account credentials
to ldb, based on the sessionInfo we now pass around.

Andrew Bartlett
(This used to be commit 84e16e4ea7240409f15efd9f64344f9e0cec8111)
2007-10-10 13:45:48 -05:00
Andrew Bartlett
3b2a6997b4 r11452: Update Heimdal to current lorikeet, including removing the ccache side
of the gsskrb5_acquire_cred hack.

Add support for delegated credentials into the auth and credentials
subsystem, and specifically into gensec_gssapi.

Add the CIFS NTVFS handler as a consumer of delegated credentials,
when no user/domain/password is specified.

Andrew Bartlett
(This used to be commit 55b89899adb692d90e63873ccdf80b9f94a6b448)
2007-10-10 13:45:38 -05:00
Andrew Bartlett
ef57650d6e r11273: Initialise the new server_info->logon_server element.
Andrew Bartlett
(This used to be commit bc6f6f9381b1038273f87feb35484dc61dd8bd8e)
2007-10-10 13:45:11 -05:00
Andrew Bartlett
a0647a89a8 r11272: In trying to track down why Win2k3 is again rejecting our PAC, ensure
we can round-trip all the way back to a server_info structure, not
just a filled in PAC_DATA. (I was worried about generated fields being
incorrect, or some other logical flaw).

Andrew Bartlett
(This used to be commit 11b1d78cc550c60201d12f8778ca8533712a5b1e)
2007-10-10 13:45:11 -05:00
Andrew Bartlett
90570e46d0 r10812: Fix capitalisation (thanks tridge).
Andrew Bartlett
(This used to be commit f78982a0f1079b07be6d7bfd9cc0f92c2cebcf1c)
2007-10-10 13:39:32 -05:00
Andrew Bartlett
1377cca5f4 r10810: This adds the hooks required to communicate the current user from the
authenticated session down into LDB.  This associates a session info
structure with the open LDB, allowing a future ldb_ntacl module to
allow/deny operations on that basis.

Along the way, I cleaned up a few things, and added new helper functions
to assist.  In particular the LSA pipe uses simpler queries for some of
the setup.

In ldap_server, I have removed the 'ldasrv:hacked' module, which hasn't
been worked on (other than making it continue to compile) since January,
and I think the features of this module are being put into ldb anyway.

I have also changed the partitions in ldap_server to be initialised
after the connection, with the private pointer used to associate the ldb
with the incoming session.

Andrew Bartlett
(This used to be commit fd7203789a2c0929eecea8125b57b833a67fed71)
2007-10-10 13:39:32 -05:00
Andrew Bartlett
05c5d145e7 r10796: Make getting an anonymous session info a utility function.
Andrew Bartlett
(This used to be commit 6021fa373405f8788dc216aae82a3f4a80df4ba7)
2007-10-10 13:39:30 -05:00
Stefan Metzmacher
3be75a4c6d r9240: - move struct security_token to the idl file, with this we can
the ndr_pull/push/print functions for it in the ntacl-lsm module

- fix compiler warnings in the ldap_encode_ndr_* code

metze
(This used to be commit 83d65d0d7ed9c240ad44aa2c881c1f07212bfda4)
2007-10-10 13:31:37 -05:00
Andrew Bartlett
b16362fab6 r8700: Propmted by tridge's need to do plaintext auth in ejs, rework the
user_info strcture in auth/

This moves it to a pattern much like that found in ntvfs, with
functions to migrate between PAIN, HASH and RESPONSE passwords.

Instead of make_user_info*() functions, we simply fill in the control
block in the callers, per recent dicussions on the lists.  This
removed a lot of data copies as well as error paths, as we can grab
much of it with talloc.

Andrew Bartlett
(This used to be commit ecbd2235a3e2be937440fa1dc0aecc5a047eda88)
2007-10-10 13:29:55 -05:00
Simo Sorce
3b03ccb2f7 r8259: We want to oset the provided flags not zero
(This used to be commit 50d8ccacca707738f131e47c739dcfacde1311e6)
2007-10-10 13:19:27 -05:00
Andrew Tridgell
38ec84a75c r8251: fixed a couple of valgrind errors in the unix auth code. Simo, can you
please check that this is what you intended?
(This used to be commit a57738769dfb5a47ac49e965750193ecdc903d5a)
2007-10-10 13:19:25 -05:00
Stefan Metzmacher
1f01bafd44 r8163: if sidcount is zero it happened that we return NT_STATUS_NO_MEMORY...
metze
(This used to be commit a9ff35a1a24f2d2935e67855fee5011ea528029f)
2007-10-10 13:19:16 -05:00
Andrew Bartlett
dbd2688c90 r8110: More PAC work. I still can't get WinXP to accept the PAC, but we are
much closer.

This changes PIDL to allow a subcontext to have a pad8 flag, saying to
pad behind to an 8 byte boundary.  This is the only way I can explain
the 4 trainling zeros in the signature struct.

Far more importantly, the PAC code is now under self-test, both in
creating/parsing our own PAC, but also a PAC from my win2k3 server.
This required changing auth_anonymous, because I wanted to reuse the
anonymous 'server_info' generation code.

I'm still having trouble with PIDL, particulary as surrounds value(),
but I'll follow up on the list.

Andrew Bartlett
(This used to be commit 50a54bf4e9bf04d2a8e0aebb3482a2ff655c8bbb)
2007-10-10 13:19:09 -05:00
Simo Sorce
a27609822b r7233: what about filling that new element ?
(This used to be commit 6a5e48c35cba801b16172cf6ff06b1d4116fb018)
2007-10-10 13:17:29 -05:00
Simo Sorce
0b4a3021e1 r7224: add some more usefull data to the auth_usersupplied_info struct
(This used to be commit e40c44e9cdc0be7c52207f8479568804e7d9cff2)
2007-10-10 13:17:28 -05:00
Andrew Bartlett
bb6e2059ee r6544: Use common structures between SAMR, NETLGON and the Krb5 PAC.
Fill out the group list for the SamLogon reply, so clients get the
supplementary groups.

Andrew Bartlett
(This used to be commit d9c31e60a72c345e3a23a7eb742906bcfc18721c)
2007-10-10 13:16:24 -05:00
Andrew Bartlett
42031bc4be r5668: Add tests to RPC-SAMLOGON to test for user@REALM style logins. These
need a NULL domain (or a "" domain, except this breaks NTLMv2, and I
need to look into it a bit more).

Add support to the Samba4 server for these logins.  This will need
extension when we handle trusted domains as a DC, as it is a principal
name, not just another format for the username.

Andrew Bartlett
(This used to be commit de02c7c222a32d2b3fb8ee8b715749b96cb647f9)
2007-10-10 13:10:58 -05:00
Stefan Metzmacher
d8d3a5ffe3 r5137: fix types
metze
(This used to be commit add1c579375d08040f722946da31ee3862f9e7ac)
2007-10-10 13:09:26 -05:00
Stefan Metzmacher
46a32687da r4620: - add interface functions to the auth subsystem so that callers doesn't need to
use function pointers anymore
- make the module init much easier
- a lot of cleanups

don't try to read the diff in auth/ better read the new files

it passes test_echo.sh and test_rpc.sh

abartlet: please fix spelling fixes

metze
(This used to be commit 3c0d16b8236451f2cfd38fc3db8ae2906106d847)
2007-10-10 13:08:34 -05:00
Stefan Metzmacher
b5b1c52a98 r4419: move security_token stuff to the libcli/security/
and debug privileges

metze
(This used to be commit c981808ed4cfa63c7ba7c4f9190b6b14f74bab40)
2007-10-10 13:07:47 -05:00
Stefan Metzmacher
9be2e63315 r4339: - rename auth_guest to auth_anonymous
- don't use static const strings in the server_info

- fix segfault when auth_sam gets "" as username

metze
(This used to be commit 7fcbd483d4977cf6483f34ddd28e6c0182897ba2)
2007-10-10 13:07:36 -05:00
Andrew Tridgell
adbdb055ee r4151: added privilege attribute handling on samdb.
pvfs will now honor some privileges on ACLs, and it will be quite easy
to add the checks for more privileges in the necessary places, by
making calls to sec_privilege_check().
(This used to be commit 3549039d0fbc54f87ae679e7288b82b28713e487)
2007-10-10 13:07:19 -05:00
Andrew Tridgell
6ca874f71a r4147: converted from NT_USER_TOKEN to struct security_token
this is mostly just a tidyup, but also adds the privilege_mask, which
I will be using shortly in ACL checking.

note that I had to move the definition of struct security_token out of
security.idl as pidl doesn't yet handle arrays of pointers, and the
usual workaround (to use a intermediate structure) would make things
too cumbersome for this structure, especially given we never encode it
to NDR.
(This used to be commit 7b446af09b8050746bfc2c50e9d56aa94397cc1a)
2007-10-10 13:06:31 -05:00
Andrew Tridgell
9defca2895 r4072: - changed the names of some of the well known sids to be more consistent
- added string constants for the important privileges.
(This used to be commit d5bc706140faf2d0a917f90f87884cd097e8a48c)
2007-10-10 13:06:22 -05:00
Andrew Tridgell
4183b2ac38 r4037: fixed a bunch of "might be uninitialised" warnings after enabling -O1 in my compile
(This used to be commit 0928b1f5b68c858922c3ea6c27ed03b5091c6221)
2007-10-10 13:06:16 -05:00
Stefan Metzmacher
856ee66537 r3810: create a LIB_SECURITY subsystem
- move dom_sid, security_descriptor, security_* funtions to one place
  and rename some of them

metze
(This used to be commit b620bdd672cfdf0e009492e648b0709e6b6d8596)
2007-10-10 13:05:56 -05:00
Andrew Bartlett
2b250bf7fd r3554: Use the new talloc_reference changes to simply the conversion of
returned validation information into the server_info struct.

Also allow for easier expansion to different variations on validation
levels.

Andrew Bartlett
(This used to be commit 316b74029cf3e10cf14cffe8ce326a97ef3aec35)
2007-10-10 13:05:31 -05:00
Andrew Tridgell
edbfc0f6e7 r3453: - split out the auth and popt includes
- tidied up some of the system includes

- moved a few more structures back from misc.idl to netlogon.idl and samr.idl now that pidl
  knows about inter-IDL dependencies
(This used to be commit 7b7477ac42d96faac1b0ff361525d2c63cedfc64)
2007-10-10 13:05:13 -05:00
Andrew Tridgell
90067934cd r3428: switched to using minimal includes for the auto-generated RPC code.
The thing that finally convinced me that minimal includes was worth
pursuing for rpc was a compiler (tcc) that failed to build Samba due
to reaching internal limits of the size of include files. Also the
fact that includes.h.gch was 16MB, which really seems excessive. This
patch brings it back to 12M, which is still too large, but
better. Note that this patch speeds up compile times for both the pch
and non-pch case.

This change also includes the addition iof a "depends()" option in our
IDL files, allowing you to specify that one IDL file depends on
another. This capability was needed for the auto-includes generation.
(This used to be commit b8f5fa8ac8e8725f3d321004f0aedf4246fc6b49)
2007-10-10 13:05:09 -05:00
Andrew Bartlett
85796280f4 r3361: Allow Samba4 (I'm interested in ntlm_auth in particular) to use
Samba3's winbind.  This is also the start of domain membership code in
Samba4, as we now (partially) parse the info3, and use it like Samba3
does.

Andrew Bartlett
(This used to be commit c1b7303c1c7d9fb815006c3bd2af20a0010d15a8)
2007-10-10 13:05:01 -05:00
Andrew Bartlett
e5fc6dd0bb r3186: Use the properties of the new talloc() system to handle the auth
session info and server info structures.

Andrew Bartlett
(This used to be commit 5bdf391b3bc10291739f5640be9a404dbbeda273)
2007-10-10 13:04:38 -05:00
Andrew Tridgell
9a415b723c r2798: get rid of a unnecessary static
(This used to be commit c3dfa7e8287811b4f54d58b45f5093521886b17e)
2007-10-10 12:59:35 -05:00
Andrew Tridgell
351ca44e8b r2674: I have realised that talloc() should have its context marked const, as
a const pointer really means that "the data pointed to by this pointer
won't change", and that is certainly true of talloc(). The fact that
some behind-the-scenes meta-data can change doesn't matter from the
point of view of const.

this fixes a number of const warnings caused by const data structures
being passed as talloc contexts. That will no longer generate a
warning.

also changed the talloc leak reporting option from --leak-check to
--leak-report, as all it does is generate a report on exit. A new
--leak-report-full option has been added that shows the complete tree
of memory allocations, which is is quite useful in tracking things down.

NOTE: I find it quite useful to insert talloc_report_full(ptr, stderr)
calls at strategic points in the code while debugging memory
allocation problems, particularly before freeing a major context (such
as the connection context). This allows you to see if that context has
been accumulating too much data, such as per-request data, which
should have been freed when the request finished.
(This used to be commit c60ff99c3129c26a9204bac1c6e5fb386114a923)
2007-10-10 12:59:20 -05:00
Andrew Tridgell
5a064d4a62 r2669: convert make_user_info() and associated functions from malloc to talloc
(This used to be commit 278cef77f083c002d17ecbbe18c20825a380eda3)
2007-10-10 12:59:19 -05:00
Andrew Tridgell
df6dce1065 r2650: fixed a memory leak in make_server_info()
(This used to be commit 4aba6e7101041100f7d400abd5e7144b95528fc3)
2007-10-10 12:59:16 -05:00
Andrew Tridgell
9a62dce0ac r2648: - use a destructor on struct server_connection to simplify the
connection termination cleanup, and to ensure that the event
  contexts are properly removed for every process model

- gave auth_context the new talloc treatment, which removes another
  source of memory leaks.
(This used to be commit 230e1cd777b0fba82dffcbd656cfa23c155d0560)
2007-10-10 12:59:16 -05:00
Andrew Tridgell
6bea5bea4c r2643: convert more of the auth subsyystem to the new talloc methods. This
also fixes a memory leak found with --leak-check.
(This used to be commit f19201ea274f0a542314c61c4af676197bf154ad)
2007-10-10 12:59:15 -05:00
Andrew Bartlett
964d46138d r2543: Catch one more use of sub_get_remote_machine().
Andrew Bartlett
(This used to be commit d483d88674f1f130bc27c3de379753ae1799330e)
2007-10-10 12:59:04 -05:00
Andrew Bartlett
f9d4bd1868 r2505: Remove unused function. If/when we implement plaintext authenticaton
in Samba4, I want to redo this.

Andrew Bartlett
(This used to be commit 139cc702ac7ce0c6e3bfdfe37199299cc1bc53c2)
2007-10-10 12:58:59 -05:00
Andrew Tridgell
833a896f56 r2104: fixed typo that causes a segv
(This used to be commit e37a4c1a63b914c46155d39c92f226c42a0393b7)
2007-10-10 12:58:25 -05:00