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

412 Commits

Author SHA1 Message Date
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