1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

512 Commits

Author SHA1 Message Date
Günther Deschner
6e0498d0e2 s3-dssync-passdb: fill in passdb_process_objects
Guenther

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-02 15:45:20 +01:00
Günther Deschner
41ba1d3a1c s3-dssync-passdb: fill in passdb_finish.
Guenther

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-02 15:45:20 +01:00
Günther Deschner
1f884cfbcb s3-dssync-passdb: fill in passdb_startup.
Guenther

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-02 15:45:20 +01:00
Günther Deschner
91e6dad749 s3-dssync-passdb: add basic routines and net function.
Guenther
2011-02-02 15:45:20 +01:00
Stefan Metzmacher
bf7a27c397 s3:libnet: add 'process_links' to dssync_ops
This allows the backend to handle linked attributes.

metze
2011-02-02 15:45:20 +01:00
Stefan Metzmacher
a152f20dd1 s3:libnet/libnet_samsync_display: fix netr_DELTA_* display
metze
2011-02-01 18:35:22 +01:00
Günther Deschner
a0c1c21916 s3-libnet: prefer dcerpc_samr_X functions.
Guenther
2011-02-01 16:00:22 +01:00
Günther Deschner
f3eb5c234e s3-libnet: prefer dcerpc_netr_X functions.
Guenther

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-01-13 12:22:28 +01:00
Günther Deschner
1cd7f6c0e1 s3-drsuapi: fix error handling after converting to dcerpc_drsuapi_X functions.
Guenther
2011-01-12 13:41:16 +01:00
Günther Deschner
4f057230ca s3-drsuapi: prefer dcerpc_drsuapi_X functions.
Guenther
2011-01-11 22:18:02 +01:00
Volker Lendecke
d096de56b1 s3: Remove unused "retry" from cli_full_connection 2010-12-20 17:10:58 +01:00
Kamen Mazdrashki
717b1158a6 idl: Use DRSUAPI_ATTID_ prefix instead of DRSUAPI_ATTRIBUTE_ for ATTID values
Those values are actually ATTID values and such, they are used
for ATTIDs for Attributes, Classes and Syntaxes.
2010-10-31 23:54:04 +00:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Günther Deschner
ffdfcfb514 s3-dsgetdcname: always pass in messaging context.
Volker, please check.

Guenther
2010-09-23 10:26:25 -07:00
Günther Deschner
102a70e809 s3-util: use shared dom_sid_dup.
Guenther
2010-09-20 14:05:07 -07:00
Günther Deschner
4dbd743e46 s3-util_sid: use shared dom_sid_compare_auth and dom_sid_equal_X functions.
Guenther
2010-09-20 14:04:37 -07:00
Günther Deschner
62544c5d2b s3-build: only include smbldap.h where needed.
Guenther
2010-09-20 13:54:56 -07:00
Jeremy Allison
718fd39f10 Fox missing SMB_MALLOC return checks noticed by "Andreas Moroder <andreas.moroder@gmx.net>".
Jeremy.
2010-09-09 15:29:03 -07:00
Günther Deschner
ca765d2f50 s3-build: only include krb5 environment variables where required.
Guenther
2010-08-26 00:20:29 +02:00
Günther Deschner
e978a3d3f4 s3-lsa: separate out init_lsa headers.
Guenther
2010-08-25 22:50:39 +02:00
Günther Deschner
06a2c23641 s3-libnet: also remove libnet/libnet_samsync_keytab.c.orig.
Guys, what are you doing here ? ;-)

Guenther
2010-08-13 15:24:00 +02:00
Günther Deschner
f0475ac36c s3-libnet: remove source3/libnet/libnet_join.c.orig, added by a previous commit.
Guenther
2010-08-13 15:22:06 +02:00
Andrew Bartlett
71d80e6be0 s3-krb5 Only build ADS support if arcfour-hmac-md5 is available
Modern Kerberos implementations have either defines or enums for these
key types, which makes doing #ifdef difficult.  This shows up in files
such as libnet_samsync_keytab.c, the bulk of which is not compiled on
current Fedora 12, for example.

The downside is that this makes Samba unconditionally depend on the
arcfour-hmac-md5 encryption type at build time.  We will no longer
support libraries that only support the DES based encryption types.
However, the single-DES types that are supported in common with AD are
already painfully weak - so much so that they are disabled by default
in modern Kerberos libraries.

If not found, ADS support will not be compiled in.

This means that our 'net ads join' will no longer set the
ACB_USE_DES_KEY_ONLY flag, and we will always try to use
arcfour-hmac-md5.

A future improvement would be to remove the use of the DES encryption
types totally, but this would require that any ACB_USE_DES_KEY_ONLY
flag be removed from existing joins.

Andrew Bartlett

Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 09:08:27 -04:00
Andrew Bartlett
fff6fa72ff s3:libnet Add other required headers for libnet_samsync_keytab.c
Due to missing defines in modern kerberos libraries, this code was
not compiled and so this wasn't noticed.

Andrew Bartlett

Signed-off-by: Simo Sorce <idra@samba.org>
2010-08-13 09:08:27 -04:00
Jim McDonough
c67b4ed3a4 s3-libnet: fix bug #6364: Pull realm from supplied username on libnet join 2010-08-12 17:51:02 -04:00
Stefan Metzmacher
08cf7ac7a0 s3:libnet/libnet_samsync.c: we also need some ndr_pull functions
metze
2010-08-08 11:05:18 +02:00
Günther Deschner
f9012635da s3-libnet: include netlogon.h in libnet samsync header.
Guenther
2010-08-06 15:43:37 +02:00
Günther Deschner
c136b84f0d s3-secrets: only include secrets.h when needed.
Guenther
2010-08-05 10:12:25 +02:00
Günther Deschner
e7a6a3ec0d s3: avoid global include of ads.h.
Guenther
2010-08-05 00:32:02 +02:00
Günther Deschner
7dad3251e3 s3-libnet: add missing header file, sorry.
Guenther
2010-07-13 23:39:20 +02:00
Günther Deschner
80b47fcb0a s3-libnet: better separate headers.
Guenther
2010-07-13 22:40:46 +02:00
Günther Deschner
dff7be8ccb s3-libads: only include libds flags where needed.
Guenther
2010-07-01 23:20:40 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Günther Deschner
8478770c35 s3-rpc_client: move protos to init_samr.h
Guenther
2010-05-18 21:42:57 +02:00
Günther Deschner
230b880d14 s3-rpc_client: move protos to cli_lsarpc.h
Guenther
2010-05-18 21:42:41 +02:00
Günther Deschner
5ed3654112 s3-rpc_client: move protos to cli_netlogon.h
Guenther
2010-05-18 21:42:37 +02:00
Jelmer Vernooij
b8268cf7b0 s3: Remove use of iconv_convenience. 2010-05-18 11:45:31 +02:00
Günther Deschner
e9f5bdf6b5 smbconf: only include smbconf headers where needed.
Guenther
2010-05-18 10:36:33 +02:00
Olaf Flebbe
d5c3db6f88 work around AIX6.1 name space pollution rename mod_name to module_name 2010-05-12 07:15:07 +02:00
Günther Deschner
c6ebab846d s3: only include gen_ndr headers where needed.
This shrinks include/includes.h.gch by the size of 7 MB and reduces build time
as follows:

ccache build w/o patch
real    4m21.529s
ccache build with patch
real    3m6.402s

pch build w/o patch
real    4m26.318s
pch build with patch
real    3m6.932s

Guenther
2010-05-06 00:22:59 +02:00
Kamen Mazdrashki
88494b2b62 s3/drs: DsCrackNames - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:12:03 +01:00
Kamen Mazdrashki
feb4c8a3e3 s3/drs: DsGetNCChanges - Propagating IDL changes to source code
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:11:57 +01:00
Andrew Tridgell
f461a72ec3 idl: switched to using the WSPP names for the 'neighbour' DRS options
The documentation shows that all these functions in fact use the same
flags variable type. To be consistent between functions, and to allow
easy reference to the WSPP docs, it is better for us to also use this
generic DrsOptions bitfield rather than one per operations.
2010-01-18 07:25:18 +11:00
Volker Lendecke
3ea64e0ad8 s3: Replace most calls to sid_append_rid() by sid_compose() 2010-01-10 20:56:16 +01:00
Günther Deschner
04f8c229de s3-kerberos: only use krb5 headers where required.
This seems to be the only way to deal with mixed heimdal/MIT setups during
merged build.

Guenther
2009-11-27 16:36:00 +01:00
Günther Deschner
3d679a3b5f s3-rpc: Avoid including every pipe's client and server stubs everywhere in samba.
Guenther
2009-11-26 20:03:17 +01:00
Günther Deschner
4a1b50afd5 s3-netlogon: pass down account name to remote password set functions.
Guenther
2009-10-13 00:07:45 +02:00
Volker Lendecke
872f9c4f91 Revert "s3: Attempt to fix machine password change"
This reverts commit 20a8ea91e1.

Ooops, this should not have been committed.
2009-10-05 22:14:06 +02:00
Volker Lendecke
20a8ea91e1 s3: Attempt to fix machine password change 2009-10-05 22:12:20 +02:00
Kamen Mazdrashki
d9994a604b w32err: WERR_DC_NOT_FOUND replaced with WERR_DCNOTFOUND
It turns out in win32 ERROR_DC_NOT_FOUND exists and it is
an error for Device Context (DC), not Domain Controller

Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2009-09-30 15:48:40 +03:00
Kamen Mazdrashki
35f4b88c7c w32err: use WERR_DC_NOT_FOUND name instead of WERR_DOMAIN_CONTROLLER_NOT_FOUND
Signed-off-by: Günther Deschner <gd@samba.org>
2009-09-17 07:18:51 +02:00
Günther Deschner
d3af0346c8 s3-dcerpc: use dcerpc_AuthLevel and remove duplicate set of flags.
Guenther
2009-09-15 17:49:34 +02:00
Günther Deschner
bea8e5fa60 s3-rpc_client: add dcerpc_transport_t to cli_rpc_pipe_open_schannel().
Guenther
2009-09-11 09:59:04 +02:00
Günther Deschner
9f15ef11bd s3-account_policy: add pdb_policy_type enum.
Guenther
2009-07-14 12:12:18 +02:00
Jim McDonough
3c382db3a3 Don't use ads realm name for non-ads case. #6481
Also check that the connection to ads worked.
2009-06-26 15:24:57 -04:00
Günther Deschner
36a8abce4f s3-libnet: fix libnet_unjoin_remove_machine_acct() when called without ads struct.
Guenther
2009-06-22 22:35:58 +02:00
Jim McDonough
7930f15f5d Don't require "Modify property" perms to unjoin bug #6481)
"net ads leave" stopped working when "modify properties"
permissions were not granted (meaning you had to be allowed
to disable the account that you were about to delete).

Libnetapi should not delete machine accounts, as this does not
happen on win32.  The WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE flag
really means "disable" (both in practice and docs).

However, to keep the functionality in "net ads leave", we
will still try to do the delete.  If this fails, we try
to do the disable.

Additionally, it is possible in windows to not disable or
delete the account, but just tell the local machine that it
is no longer in the account.  libnet can now do this as well.
2009-06-19 13:46:07 -04:00
Simo Sorce
4112bb2428 Move smb_create_user() in samsync
It is not used anywhere else, so make it also static and remove
it from proto.h
2009-05-16 15:30:48 -04:00
Günther Deschner
e28071f79a s3-libnetjoin: make acct_flags dependent on secure channel type.
Guenther
2009-04-24 14:38:28 +02:00
Günther Deschner
37f491e5e3 s3-libnetjoin: add support for WKSSVC_JOIN_FLAGS_JOIN_UNSECURE.
Guenther
2009-04-24 14:38:19 +02:00
Volker Lendecke
b8cd1cff2d Fix an uninitialized variable 2009-04-23 14:35:50 +02:00
Günther Deschner
b5bec1a6d7 s3-secdesc: use SEC_FLAG_MAXIMUM_ALLOWED instead of SEC_RIGHTS_MAXIMUM_ALLOWED.
Guenther
2009-04-21 12:40:47 +02:00
Jelmer Vernooij
4c32978d97 Remove smb_mkstemp() - libreplace will now provide a secure mkstemp() if
the system one is broken.
2009-04-20 23:58:26 +02:00
Andrew Bartlett
6c9caed481 Merge commit 'origin/master' into libcli-auth-merge-without-netlogond 2009-04-20 16:53:02 +02:00
Andrew Bartlett
53765c81f7 Remove use of talloc_reference in cli_rpc_pipe_open_schannel_with_key() 2009-04-20 16:50:49 +02:00
Jeremy Allison
d9804ae3cc Fix bug #6089 - Winbind samr_OpenDomain not possible with Samba 3.2.6+
What a difference a name makes... :-). Just because something is missnamed
SAMR_ACCESS_OPEN_DOMAIN, when it should actually be SAMR_ACCESS_LOOKUP_DOMAIN,
don't automatically use it for a security check in _samr_OpenDomain().
Jeremy.
2009-04-15 15:40:00 -07:00
Andrew Bartlett
baf7274fed Make Samba3 use the new common libcli/auth code
This is particuarly in the netlogon client (but not server at this
stage)
2009-04-14 16:23:44 +10:00
Andrew Bartlett
df8e1908ef Use common samsync delta decryption functions in libnet_samsync.c
Andrew Bartlett
2009-04-14 16:23:43 +10:00
Andrew Bartlett
fe0f0e5670 Adapt to common crypto functions: sam_pwd_hash() -> sam_rid_crypt() 2009-04-14 16:23:42 +10:00
Andrew Bartlett
f28f113d8e Rework Samba3 to use new libcli/auth code (partial)
This commit is mostly to cope with the removal of SamOemHash (replaced
by arcfour_crypt()) and other collisions (such as changed function
arguments compared to Samba3).

We still provide creds_hash3 until Samba3 uses the credentials code in
netlogon server

Andrew Bartlett
2009-04-14 16:23:35 +10:00
Andrew Bartlett
872cb0257c Move DRSUAPI per-attribute decryption into a common file
This file (contining metze's decryption routines) is now also be used by
Samba3's DRSUAPI implementation

Andrew Bartlett
2009-04-14 14:19:39 +10:00
Andrew Bartlett
574a6a8c35 s3:kerberos Rework smb_krb5_unparse_name() to take a talloc context
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 13:25:36 +02:00
Andrew Bartlett
2050187673 s3:libads Make ads_get_dn() take a talloc context
Also remove ads_memfree(), which was only ever a wrapper around
SAFE_FREE, used only to free the DN from ads_get_ds().

This actually makes libgpo more consistant, as it mixed a talloc and a
malloc based string on the same element.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-06 15:54:41 +02:00
Günther Deschner
5cdf75e679 s3-libnet-samsync: return appropriate error code in fetch_sam_entry().
Guenther
2009-04-01 19:12:19 +02:00
Günther Deschner
e18f57fd36 s3-libnet-samsync: use smb_create_user().
Guenther
2009-04-01 19:12:19 +02:00
Günther Deschner
e4802bfcad s3-libnet-samsync: some pure cosmetics.
Guenther
2009-04-01 19:12:19 +02:00
Günther Deschner
af78240cbe s3-libnet-samsync: use parent talloc context for libnet_samsync_passdb.
Guenther
2009-04-01 19:12:18 +02:00
Günther Deschner
264b28ec09 s3-libnet: only call libnet_dssync_process() startup and shutdown callbacks when filled in.
Guenther
2009-04-01 16:58:48 +02:00
Günther Deschner
e3f7057b09 s3-libnet: Fix Bug #6193: avoid messing with sync_context in libnet_samsync_delta().
We absolutely need to avoid messing with the sync_context as that breaks the
stream of replication data coming from the DC (only replicates ~350 instead of
~4000 groups).

Guenther
2009-03-25 16:09:13 +01:00
Günther Deschner
531af136f9 s3: remove POLICY_HND.
Guenther
2009-03-18 23:22:29 +01:00
Michael Adam
6c197ffa30 s3: move definition of W_ERROR_NOT_OK_GOTO_DONE down to libcli/util/werror.h
Michael
2009-02-26 13:22:54 +01:00
Günther Deschner
e9d5405948 s3-libnet: fix coverity #848 (UNINIT).
Guenther
2009-02-19 13:01:59 +01:00
Volker Lendecke
fda8abac17 s3: Fix 'net rpc join' for users with the SeMachineAccountPrivilege. 2009-02-03 14:44:30 +01:00
Dan Sledz
d96248a9b4 Add two new parameters to control how we verify kerberos tickets. Removes lp_use_kerberos_keytab parameter.
The first is "kerberos method" and replaces the "use kerberos keytab"
with an enum.  Valid options are:
secrets only - use only the secrets for ticket verification (default)
system keytab - use only the system keytab for ticket verification
dedicated keytab - use a dedicated keytab for ticket verification.
secrets and keytab - use the secrets.tdb first, then the system keytab

For existing installs:
"use kerberos keytab = yes" corresponds to secrets and keytab
"use kerberos keytab = no" corresponds to secrets only

The major difference between "system keytab" and "dedicated keytab" is
that the latter method relies on kerberos to find the correct keytab
entry instead of filtering based on expected principals.

The second parameter is "dedicated keytab file", which is the keytab
to use when in "dedicated keytab" mode.  This keytab is only used in
ads_verify_ticket.
2009-02-01 20:23:31 -08:00
Jeremy Allison
a5f0640bf9 Fix coverity CID#117 - resource leak in error path.
Jeremy.
2009-01-29 17:56:40 -08:00
Jeremy Allison
08802db8db Fix coverity CID#116. Resource leak on error path.
Jeremy.
2009-01-29 17:31:12 -08:00
Jeremy Allison
734647bd85 Fix coverity CID#115. Resource leak in error path.
Jeremy.
2009-01-29 17:27:47 -08:00
Michael Adam
39ec8791f8 s3: make better use of ccache by not including version.h in every C-file.
version.h changes rather frequently. Since it is included via includes.h,
this means each C file will be a cache miss. This applies to the following
situations:

* When building a new package with a new Samba version

* building in a git branch after calling mkversion.sh
  after a new commit (i.e. virtually always)

This patch improves the situation in the following way:

* remove inlude "version.h" from includes.h

* Use samba_version_string() instead of SAMBA_VERSION_STRING
  in files that use no other macro from version.h instead of
  SAMBA_VERSION_STRING.

* explicitly include "version.h" in those files that use more
  macros from "version.h" than just SAMBA_VERSION_STRING.

Michael
2009-01-15 22:56:01 +01:00
Günther Deschner
46f55ef5bc s3-samr: avoid all init_samr_user* functions.
Guenther
2009-01-06 16:02:10 +01:00
Jeremy Allison
cb7d7beb99 Fix another "format not a string literal and no format arguments" warning.
Jeremy
2008-12-23 09:50:10 -08:00
Jeremy Allison
aaea68791c In gcc version 4.3.2 we get warnings for functions declared with
attribute warn_unused_result. Start to fix these.
Jeremy.
2008-12-22 20:08:14 -08:00
Stefan Metzmacher
2bb91392b4 s3:libnet_join: use DS_FORCE_REDISCOVERY
metze
2008-12-13 11:42:37 +01:00
Stefan Metzmacher
6a993cb333 s3:libnet_join: call saf_join_store() after a the join.
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(similar to commit feef594d27)
2008-12-13 11:42:37 +01:00
Günther Deschner
138283c7c1 s3-libnet: fix DEBUG statement in libnet_keytab.
Guenther
2008-12-11 15:21:54 +01:00
Günther Deschner
c8b0196c95 s3-libnet: fix build warning (missing prototype).
Guenther
2008-12-09 15:07:47 +01:00
Günther Deschner
28099876f9 s3-libnetjoin: Fix bug #5749. Re-set acctflags while joining. fix from metze.
Guenther
2008-11-29 00:16:56 +01:00
Günther Deschner
42adfd1be2 s3-libnetjoin: remove unused md4_trust_password, found by metze.
Guenther
2008-11-29 00:16:46 +01:00
Günther Deschner
4d7485df96 s3-samr: fix init_samr_user_info{23,24} callers.
Guenther
2008-11-28 13:55:38 +01:00
Günther Deschner
98e1dd64ab s3-libnetjoin: fix build warning.
Guenther
2008-11-21 15:57:14 +01:00
Günther Deschner
35ac6236bd s3-libnetjoin: try to show a better error message upon invalid configuration.
Guenther
2008-11-21 14:49:53 +01:00