1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3

Conflicts:

	source/auth/credentials/config.mk
	source/auth/gensec/config.mk
	source/build/smb_build/makefile.pm
	source/heimdal_build/config.mk
	source/lib/events/config.mk
	source/lib/nss_wrapper/config.mk
	source/lib/policy/config.mk
	source/lib/registry/config.mk
	source/lib/socket_wrapper/config.mk
	source/lib/tdb/config.mk
	source/lib/tls/config.mk
	source/lib/util/config.mk
	source/libcli/config.mk
	source/libcli/ldap/config.mk
	source/libnet/config.mk
	source/librpc/config.mk
	source/param/config.mk
	source/rpc_server/config.mk
	source/scripting/ejs/config.mk
	source/smbd/process_model.mk
(This used to be commit 760378e029)
This commit is contained in:
Jelmer Vernooij 2008-04-08 03:45:06 +02:00
commit b5d84a74d1
388 changed files with 4441 additions and 1942 deletions

3
.gitignore vendored
View File

@ -66,7 +66,6 @@ source/lib/tdr/tdr_proto.h
source/lib/util/pidfile.h
source/lib/util/unix_privs.h
source/lib/util/util_proto.h
source/lib/util/wrap_xattr.h
source/lib/util/asn1_proto.h
source/libcli/finddcs.h
source/libcli/libcli_proto.h
@ -190,8 +189,6 @@ source/dsdb/schema/proto.h
source/lib/crypto/test_proto.h
source/lib/registry/tests/proto.h
source/lib/util/apidocs
source/lib/util/util_ldb.h
source/libcli/ldap/ldap_ndr.h
source/libcli/resolve/lp_proto.h
source/apidocs
*.swp

8
NEWS
View File

@ -22,12 +22,9 @@ Introduction of LDB
Samba now stores most of its persistent data in a LDAP-like database
called LDB (see ldb(7) for more info).
Much improved SWAT
Removed SWAT
==================
SWAT has had some rather large improvements and is now more than just a
direct editor for smb.conf. Its layout has been improved. SWAT can now also
be used for editing run-time data - maintaining user information, provisioning,
etc. TLS is supported out of the box.
Unlike previous versions, Samba4 does not provide a web interface at this time.
Built-in KDC
============
@ -251,7 +248,6 @@ The following parameters have been removed:
- locking
- lock spin count
- lock spin time
- oplocks
- level2 oplocks
- oplock break wait time
- oplock contention limit

View File

@ -10,9 +10,9 @@ Samba 4 is currently not yet in a state where it is usable in
production environments. Note the WARNINGS below, and the STATUS file,
which aims to document what should and should not work.
Samba4 alpha3 follows on from our first alpha release, made in
September, and the Technology Preview series we have offered for some
time now.
Samba4 alpha3 follows on from our second alpha release (made in
December), the first alpha release (made in September), and the
Technology Preview series we have offered for some time now.
WARNINGS
========
@ -70,9 +70,11 @@ CHANGES SINCE Alpha2
In the time since Samba4 Alpha2 was released in December 2007, Samba has
continued to evolve, but you may particularly notice these areas:
Python Bindings: Bindings for Python are now in place, and used for
Python Bindings: Bindings for Python are now in place, and used for
Samba's provision script, slowly displacing EJS as the embedded
scripting language
scripting language. With its increased use, Python is no longer
optional, and configure will generate an error if it cannot locate
an appropriate Python installation.
SWAT Disabled: Due to a lack of developer time and without a
long-term web developer to maintain it, the SWAT web UI has been
@ -83,6 +85,23 @@ continued to evolve, but you may particularly notice these areas:
GNU Make: To try and simplfy our build system, we rely on GNU Make
to avoid autogenerating a massive single makefile.
Account Expiry: Samba4 now better handles installations over 30 days
old (thanks to our long-suffering testers for keeping installations
around that long!)
Registry: Samba4 registry interoperability has been improved in
both the client utilities and in the registry service exposed by
the Samba4 server itself.
Administrative Tools: Many enhancements have been made that allow
better integration with Windows administrative tools, especially
Active Directory Users and Computers.
ID mapping: Samba4 now handles ID mapping via winbind. The mappings
are stored in a central ldb that could be shared across multiple
machines using LDAP. Internal callers access this interface via a new
wbclient library.
These are just some of the highlights of the work done in the past few
months. More details can be found in our GIT history.

View File

@ -16,6 +16,13 @@ aimed at production use of Samba4.
Step 1: download Samba4
-----------------------
If you have downloaded the Samba4 code via a tarball released from the
samba.org website, Step 1 has already been completed for you. For testing
with the version released in the tarball, you may continue on to Step 2. Note
that the references below to the top-level directory named "samba4" will
instead be based on the name of the tarball downloaded (e.g.
"samba-4.0.0alpha3" for the tarball samba-4.0.0alpha3.tar.gz).
There are 2 methods of doing this:
method 1: "rsync -avz samba.org::ftp/unpacked/samba_4_0_test/ samba4"
@ -50,10 +57,7 @@ Run this::
$ cd samba4/source
$ ./configure
$ make proto all
If you have gcc 3.4 or newer, then substitute "pch" for "proto" to
greatly speed up the compile process (about 5x faster).
$ make
Step 3: install Samba4
----------------------
@ -120,14 +124,10 @@ in your $PATH. Make sure you run the right version!
Step 7: testing Samba4
----------------------
try these commands::
try this command::
$ smbclient //localhost/test -Uadministrator%SOMEPASSWORD
or::
$ ./script/tests/test_posix.sh //localhost/test administrator SOMEPASSWORD
NOTE about filesystem support
-----------------------------

View File

@ -82,8 +82,8 @@ libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
modules:: $(PLUGINS)
headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS)
manpages:: $(MANPAGES)
all:: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods
everything:: all libraries headers
all:: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods libraries headers
everything:: all
LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin/shared

View File

@ -57,7 +57,7 @@ SAMBA_VERSION_TP_RELEASE=
# e.g. SAMBA_VERSION_ALPHA_RELEASE=1 #
# -> "4.0.0alpha1" #
########################################################
SAMBA_VERSION_ALPHA_RELEASE=3
SAMBA_VERSION_ALPHA_RELEASE=4
########################################################
# For 'pre' releases the version will be #

View File

@ -21,13 +21,14 @@
#include "includes.h"
#include "lib/util/dlinklist.h"
#include "auth/auth.h"
#include "auth/auth_proto.h"
#include "lib/events/events.h"
#include "param/param.h"
/***************************************************************************
Set a fixed challenge
***************************************************************************/
NTSTATUS auth_context_set_challenge(struct auth_context *auth_ctx, const uint8_t chal[8], const char *set_by)
_PUBLIC_ NTSTATUS auth_context_set_challenge(struct auth_context *auth_ctx, const uint8_t chal[8], const char *set_by)
{
auth_ctx->challenge.set_by = talloc_strdup(auth_ctx, set_by);
NT_STATUS_HAVE_NO_MEMORY(auth_ctx->challenge.set_by);
@ -145,7 +146,7 @@ static void auth_check_password_sync_callback(struct auth_check_password_request
*
**/
NTSTATUS auth_check_password(struct auth_context *auth_ctx,
_PUBLIC_ NTSTATUS auth_check_password(struct auth_context *auth_ctx,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
struct auth_serversupplied_info **server_info)
@ -217,7 +218,7 @@ static void auth_check_password_async_timed_handler(struct event_context *ev, st
*
**/
void auth_check_password_send(struct auth_context *auth_ctx,
_PUBLIC_ void auth_check_password_send(struct auth_context *auth_ctx,
const struct auth_usersupplied_info *user_info,
void (*callback)(struct auth_check_password_request *req, void *private_data),
void *private_data)
@ -319,7 +320,7 @@ failed:
*
**/
NTSTATUS auth_check_password_recv(struct auth_check_password_request *req,
_PUBLIC_ NTSTATUS auth_check_password_recv(struct auth_check_password_request *req,
TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info **server_info)
{
@ -349,7 +350,7 @@ NTSTATUS auth_check_password_recv(struct auth_check_password_request *req,
Make a auth_info struct for the auth subsystem
- Allow the caller to specify the methods to use
***************************************************************************/
NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **methods,
_PUBLIC_ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **methods,
struct event_context *ev,
struct messaging_context *msg,
struct loadparm_context *lp_ctx,
@ -412,7 +413,7 @@ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **methods,
Make a auth_info struct for the auth subsystem
- Uses default auth_methods, depending on server role and smb.conf settings
***************************************************************************/
NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx,
_PUBLIC_ NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx,
struct event_context *ev,
struct messaging_context *msg,
struct loadparm_context *lp_ctx,
@ -446,7 +447,7 @@ static int num_backends;
The 'name' can be later used by other backends to find the operations
structure for this backend.
*/
NTSTATUS auth_register(const struct auth_operations *ops)
_PUBLIC_ NTSTATUS auth_register(const struct auth_operations *ops)
{
struct auth_operations *new_ops;
@ -511,7 +512,7 @@ const struct auth_critical_sizes *auth_interface_version(void)
return &critical_sizes;
}
NTSTATUS auth_init(void)
_PUBLIC_ NTSTATUS auth_init(void)
{
static bool initialized = false;
extern NTSTATUS auth_developer_init(void);

View File

@ -190,6 +190,63 @@ struct auth_critical_sizes {
#include "auth/session.h"
#include "auth/system_session_proto.h"
#include "auth/auth_proto.h"
struct ldb_message;
struct ldb_context;
NTSTATUS auth_get_challenge(struct auth_context *auth_ctx, const uint8_t **_chal);
NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
struct ldb_context *sam_ctx,
uint32_t logon_parameters,
struct ldb_message *msg,
struct ldb_message *msg_domain_ref,
const char *logon_workstation,
const char *name_for_logs);
struct auth_session_info *system_session(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
NTSTATUS authsam_make_server_info(TALLOC_CTX *mem_ctx, struct ldb_context *sam_ctx,
const char *netbios_name,
struct ldb_message *msg,
struct ldb_message *msg_domain_ref,
DATA_BLOB user_sess_key, DATA_BLOB lm_sess_key,
struct auth_serversupplied_info **_server_info);
NTSTATUS auth_system_session_info(TALLOC_CTX *parent_ctx,
struct loadparm_context *lp_ctx,
struct auth_session_info **_session_info) ;
NTSTATUS auth_nt_status_squash(NTSTATUS nt_status);
NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **methods,
struct event_context *ev,
struct messaging_context *msg,
struct loadparm_context *lp_ctx,
struct auth_context **auth_ctx);
NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx,
struct event_context *ev,
struct messaging_context *msg,
struct loadparm_context *lp_ctx,
struct auth_context **auth_ctx);
NTSTATUS auth_check_password(struct auth_context *auth_ctx,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
struct auth_serversupplied_info **server_info);
NTSTATUS auth_init(void);
NTSTATUS auth_register(const struct auth_operations *ops);
NTSTATUS authenticate_username_pw(TALLOC_CTX *mem_ctx,
struct event_context *ev,
struct messaging_context *msg,
struct loadparm_context *lp_ctx,
const char *nt4_domain,
const char *nt4_username,
const char *password,
struct auth_session_info **session_info);
NTSTATUS auth_check_password_recv(struct auth_check_password_request *req,
TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info **server_info);
void auth_check_password_send(struct auth_context *auth_ctx,
const struct auth_usersupplied_info *user_info,
void (*callback)(struct auth_check_password_request *req, void *private_data),
void *private_data);
NTSTATUS auth_context_set_challenge(struct auth_context *auth_ctx, const uint8_t chal[8], const char *set_by);
#endif /* _SMBAUTH_H_ */

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "auth/auth.h"
#include "auth/auth_proto.h"
#include "param/param.h"
/**

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "auth/auth.h"
#include "auth/auth_proto.h"
#include "libcli/security/security.h"
#include "librpc/gen_ndr/ndr_samr.h"

View File

@ -25,6 +25,7 @@
#include "lib/ldb/include/ldb.h"
#include "util/util_ldb.h"
#include "auth/auth.h"
#include "auth/auth_proto.h"
#include "auth/auth_sam.h"
#include "dsdb/samdb/samdb.h"
#include "libcli/security/security.h"

View File

@ -25,6 +25,7 @@
#include "auth/auth.h"
#include "lib/events/events.h"
#include "param/param.h"
#include "auth/session_proto.h"
/*
It's allowed to pass NULL as session_info,

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "auth/auth.h"
#include "auth/auth_proto.h"
#include "system/passwd.h" /* needed by some systems for struct passwd */
#include "lib/socket/socket.h"
#include "auth/pam_errors.h"

View File

@ -246,7 +246,7 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth_context *auth_contex
* @param nt_status NTSTATUS input for squashing.
* @return the 'squashed' nt_status
**/
NTSTATUS auth_nt_status_squash(NTSTATUS nt_status)
_PUBLIC_ NTSTATUS auth_nt_status_squash(NTSTATUS nt_status)
{
if NT_STATUS_EQUAL(nt_status, NT_STATUS_NO_SUCH_USER) {
/* Match WinXP and don't give the game away */

View File

@ -23,6 +23,8 @@
#include "includes.h"
#include "auth/auth.h"
#include "auth/auth_proto.h"
#include "auth/session_proto.h"
#include "nsswitch/winbind_client.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
#include "librpc/gen_ndr/ndr_winbind.h"

View File

@ -8,7 +8,7 @@ mkinclude credentials/config.mk
PRIVATE_PROTO_HEADER = session_proto.h
PUBLIC_DEPENDENCIES = CREDENTIALS
PUBLIC_HEADERS += auth/session.h
# PUBLIC_HEADERS += auth/session.h
auth_session_OBJ_FILES = $(addprefix auth/, session.o)
@ -95,7 +95,7 @@ PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL LIBSECURITY SAMDB CREDENTIALS
service_auth_OBJ_FILES = $(addprefix auth/, auth.o auth_util.o auth_simple.o)
PUBLIC_HEADERS += auth/auth.h
# PUBLIC_HEADERS += auth/auth.h
[PYTHON::swig_auth]
PUBLIC_DEPENDENCIES = auth_system_session

View File

@ -9,7 +9,7 @@ PRIVATE_DEPENDENCIES = \
CREDENTIALS_OBJ_FILES = $(addprefix auth/credentials/, credentials.o credentials_files.o credentials_ntlm.o credentials_krb5.o ../kerberos/kerberos_util.o)
PUBLIC_HEADERS += $(addprefix auth/credentials/, credentials.h credentials_krb5.h)
PUBLIC_HEADERS += auth/credentials/credentials.h
[PYTHON::swig_credentials]
PUBLIC_DEPENDENCIES = CREDENTIALS LIBCMDLINE_CREDENTIALS

View File

@ -33,7 +33,7 @@
* Create a new credentials structure
* @param mem_ctx TALLOC_CTX parent for credentials structure
*/
struct cli_credentials *cli_credentials_init(TALLOC_CTX *mem_ctx)
_PUBLIC_ struct cli_credentials *cli_credentials_init(TALLOC_CTX *mem_ctx)
{
struct cli_credentials *cred = talloc(mem_ctx, struct cli_credentials);
if (!cred) {
@ -77,7 +77,7 @@ struct cli_credentials *cli_credentials_init(TALLOC_CTX *mem_ctx)
* Create a new anonymous credential
* @param mem_ctx TALLOC_CTX parent for credentials structure
*/
struct cli_credentials *cli_credentials_init_anon(TALLOC_CTX *mem_ctx)
_PUBLIC_ struct cli_credentials *cli_credentials_init_anon(TALLOC_CTX *mem_ctx)
{
struct cli_credentials *anon_credentials;
@ -87,23 +87,23 @@ struct cli_credentials *cli_credentials_init_anon(TALLOC_CTX *mem_ctx)
return anon_credentials;
}
void cli_credentials_set_kerberos_state(struct cli_credentials *creds,
_PUBLIC_ void cli_credentials_set_kerberos_state(struct cli_credentials *creds,
enum credentials_use_kerberos use_kerberos)
{
creds->use_kerberos = use_kerberos;
}
enum credentials_use_kerberos cli_credentials_get_kerberos_state(struct cli_credentials *creds)
_PUBLIC_ enum credentials_use_kerberos cli_credentials_get_kerberos_state(struct cli_credentials *creds)
{
return creds->use_kerberos;
}
void cli_credentials_set_gensec_features(struct cli_credentials *creds, uint32_t gensec_features)
_PUBLIC_ void cli_credentials_set_gensec_features(struct cli_credentials *creds, uint32_t gensec_features)
{
creds->gensec_features = gensec_features;
}
uint32_t cli_credentials_get_gensec_features(struct cli_credentials *creds)
_PUBLIC_ uint32_t cli_credentials_get_gensec_features(struct cli_credentials *creds)
{
return creds->gensec_features;
}
@ -115,7 +115,7 @@ uint32_t cli_credentials_get_gensec_features(struct cli_credentials *creds)
* @retval The username set on this context.
* @note Return value will never be NULL except by programmer error.
*/
const char *cli_credentials_get_username(struct cli_credentials *cred)
_PUBLIC_ const char *cli_credentials_get_username(struct cli_credentials *cred)
{
if (cred->machine_account_pending) {
cli_credentials_set_machine_account(cred,
@ -134,7 +134,7 @@ const char *cli_credentials_get_username(struct cli_credentials *cred)
return cred->username;
}
bool cli_credentials_set_username(struct cli_credentials *cred,
_PUBLIC_ bool cli_credentials_set_username(struct cli_credentials *cred,
const char *val, enum credentials_obtained obtained)
{
if (obtained >= cred->username_obtained) {
@ -159,7 +159,7 @@ bool cli_credentials_set_username_callback(struct cli_credentials *cred,
return false;
}
bool cli_credentials_set_bind_dn(struct cli_credentials *cred,
_PUBLIC_ bool cli_credentials_set_bind_dn(struct cli_credentials *cred,
const char *bind_dn)
{
cred->bind_dn = talloc_strdup(cred, bind_dn);
@ -172,7 +172,7 @@ bool cli_credentials_set_bind_dn(struct cli_credentials *cred,
* @retval The username set on this context.
* @note Return value will be NULL if not specified explictly
*/
const char *cli_credentials_get_bind_dn(struct cli_credentials *cred)
_PUBLIC_ const char *cli_credentials_get_bind_dn(struct cli_credentials *cred)
{
return cred->bind_dn;
}
@ -184,7 +184,7 @@ const char *cli_credentials_get_bind_dn(struct cli_credentials *cred)
* @retval The username set on this context.
* @note Return value will never be NULL except by programmer error.
*/
const char *cli_credentials_get_principal(struct cli_credentials *cred, TALLOC_CTX *mem_ctx)
_PUBLIC_ const char *cli_credentials_get_principal(struct cli_credentials *cred, TALLOC_CTX *mem_ctx)
{
if (cred->machine_account_pending) {
cli_credentials_set_machine_account(cred,
@ -246,7 +246,7 @@ bool cli_credentials_set_principal_callback(struct cli_credentials *cred,
* function to determine if authentication has been explicitly
* requested */
bool cli_credentials_authentication_requested(struct cli_credentials *cred)
_PUBLIC_ bool cli_credentials_authentication_requested(struct cli_credentials *cred)
{
if (cred->bind_dn) {
return true;
@ -275,7 +275,7 @@ bool cli_credentials_authentication_requested(struct cli_credentials *cred)
* @param cred credentials context
* @retval If set, the cleartext password, otherwise NULL
*/
const char *cli_credentials_get_password(struct cli_credentials *cred)
_PUBLIC_ const char *cli_credentials_get_password(struct cli_credentials *cred)
{
if (cred->machine_account_pending) {
cli_credentials_set_machine_account(cred,
@ -297,7 +297,7 @@ const char *cli_credentials_get_password(struct cli_credentials *cred)
/* Set a password on the credentials context, including an indication
* of 'how' the password was obtained */
bool cli_credentials_set_password(struct cli_credentials *cred,
_PUBLIC_ bool cli_credentials_set_password(struct cli_credentials *cred,
const char *val,
enum credentials_obtained obtained)
{
@ -313,7 +313,7 @@ bool cli_credentials_set_password(struct cli_credentials *cred,
return false;
}
bool cli_credentials_set_password_callback(struct cli_credentials *cred,
_PUBLIC_ bool cli_credentials_set_password_callback(struct cli_credentials *cred,
const char *(*password_cb) (struct cli_credentials *))
{
if (cred->password_obtained < CRED_CALLBACK) {
@ -358,7 +358,7 @@ bool cli_credentials_set_old_password(struct cli_credentials *cred,
* @param cred credentials context
* @retval If set, the cleartext password, otherwise NULL
*/
const struct samr_Password *cli_credentials_get_nt_hash(struct cli_credentials *cred,
_PUBLIC_ const struct samr_Password *cli_credentials_get_nt_hash(struct cli_credentials *cred,
TALLOC_CTX *mem_ctx)
{
const char *password = cli_credentials_get_password(cred);
@ -377,7 +377,7 @@ const struct samr_Password *cli_credentials_get_nt_hash(struct cli_credentials *
}
}
bool cli_credentials_set_nt_hash(struct cli_credentials *cred,
_PUBLIC_ bool cli_credentials_set_nt_hash(struct cli_credentials *cred,
const struct samr_Password *nt_hash,
enum credentials_obtained obtained)
{
@ -401,7 +401,7 @@ bool cli_credentials_set_nt_hash(struct cli_credentials *cred,
* @retval The domain set on this context.
* @note Return value will never be NULL except by programmer error.
*/
const char *cli_credentials_get_domain(struct cli_credentials *cred)
_PUBLIC_ const char *cli_credentials_get_domain(struct cli_credentials *cred)
{
if (cred->machine_account_pending) {
cli_credentials_set_machine_account(cred,
@ -421,7 +421,7 @@ const char *cli_credentials_get_domain(struct cli_credentials *cred)
}
bool cli_credentials_set_domain(struct cli_credentials *cred,
_PUBLIC_ bool cli_credentials_set_domain(struct cli_credentials *cred,
const char *val,
enum credentials_obtained obtained)
{
@ -456,7 +456,7 @@ bool cli_credentials_set_domain_callback(struct cli_credentials *cred,
* @retval The realm set on this context.
* @note Return value will never be NULL except by programmer error.
*/
const char *cli_credentials_get_realm(struct cli_credentials *cred)
_PUBLIC_ const char *cli_credentials_get_realm(struct cli_credentials *cred)
{
if (cred->machine_account_pending) {
cli_credentials_set_machine_account(cred,
@ -479,7 +479,7 @@ const char *cli_credentials_get_realm(struct cli_credentials *cred)
* Set the realm for this credentials context, and force it to
* uppercase for the sainity of our local kerberos libraries
*/
bool cli_credentials_set_realm(struct cli_credentials *cred,
_PUBLIC_ bool cli_credentials_set_realm(struct cli_credentials *cred,
const char *val,
enum credentials_obtained obtained)
{
@ -512,7 +512,7 @@ bool cli_credentials_set_realm_callback(struct cli_credentials *cred,
* @retval The workstation name set on this context.
* @note Return value will never be NULL except by programmer error.
*/
const char *cli_credentials_get_workstation(struct cli_credentials *cred)
_PUBLIC_ const char *cli_credentials_get_workstation(struct cli_credentials *cred)
{
if (cred->workstation_obtained == CRED_CALLBACK &&
!cred->callback_running) {
@ -525,7 +525,7 @@ const char *cli_credentials_get_workstation(struct cli_credentials *cred)
return cred->workstation;
}
bool cli_credentials_set_workstation(struct cli_credentials *cred,
_PUBLIC_ bool cli_credentials_set_workstation(struct cli_credentials *cred,
const char *val,
enum credentials_obtained obtained)
{
@ -560,7 +560,7 @@ bool cli_credentials_set_workstation_callback(struct cli_credentials *cred,
* @param obtained This enum describes how 'specified' this password is
*/
void cli_credentials_parse_string(struct cli_credentials *credentials, const char *data, enum credentials_obtained obtained)
_PUBLIC_ void cli_credentials_parse_string(struct cli_credentials *credentials, const char *data, enum credentials_obtained obtained)
{
char *uname, *p;
@ -597,7 +597,7 @@ void cli_credentials_parse_string(struct cli_credentials *credentials, const cha
* @param mem_ctx The memory context to place the result on
*/
const char *cli_credentials_get_unparsed_name(struct cli_credentials *credentials, TALLOC_CTX *mem_ctx)
_PUBLIC_ const char *cli_credentials_get_unparsed_name(struct cli_credentials *credentials, TALLOC_CTX *mem_ctx)
{
const char *bind_dn = cli_credentials_get_bind_dn(credentials);
const char *domain;
@ -625,7 +625,7 @@ const char *cli_credentials_get_unparsed_name(struct cli_credentials *credential
*
* @param cred Credentials structure to fill in
*/
void cli_credentials_set_conf(struct cli_credentials *cred,
_PUBLIC_ void cli_credentials_set_conf(struct cli_credentials *cred,
struct loadparm_context *lp_ctx)
{
cli_credentials_set_username(cred, "", CRED_UNINITIALISED);
@ -640,7 +640,7 @@ void cli_credentials_set_conf(struct cli_credentials *cred,
*
* @param cred Credentials structure to fill in
*/
void cli_credentials_guess(struct cli_credentials *cred,
_PUBLIC_ void cli_credentials_guess(struct cli_credentials *cred,
struct loadparm_context *lp_ctx)
{
char *p;
@ -683,7 +683,7 @@ void cli_credentials_guess(struct cli_credentials *cred,
* Attach NETLOGON credentials for use with SCHANNEL
*/
void cli_credentials_set_netlogon_creds(struct cli_credentials *cred,
_PUBLIC_ void cli_credentials_set_netlogon_creds(struct cli_credentials *cred,
struct creds_CredentialState *netlogon_creds)
{
cred->netlogon_creds = talloc_reference(cred, netlogon_creds);
@ -702,7 +702,7 @@ struct creds_CredentialState *cli_credentials_get_netlogon_creds(struct cli_cred
* Set NETLOGON secure channel type
*/
void cli_credentials_set_secure_channel_type(struct cli_credentials *cred,
_PUBLIC_ void cli_credentials_set_secure_channel_type(struct cli_credentials *cred,
enum netr_SchannelType secure_channel_type)
{
cred->secure_channel_type = secure_channel_type;
@ -712,7 +712,7 @@ void cli_credentials_set_secure_channel_type(struct cli_credentials *cred,
* Return NETLOGON secure chanel type
*/
enum netr_SchannelType cli_credentials_get_secure_channel_type(struct cli_credentials *cred)
_PUBLIC_ enum netr_SchannelType cli_credentials_get_secure_channel_type(struct cli_credentials *cred)
{
return cred->secure_channel_type;
}
@ -720,7 +720,7 @@ enum netr_SchannelType cli_credentials_get_secure_channel_type(struct cli_creden
/**
* Fill in a credentials structure as the anonymous user
*/
void cli_credentials_set_anonymous(struct cli_credentials *cred)
_PUBLIC_ void cli_credentials_set_anonymous(struct cli_credentials *cred)
{
cli_credentials_set_username(cred, "", CRED_SPECIFIED);
cli_credentials_set_domain(cred, "", CRED_SPECIFIED);
@ -734,7 +734,7 @@ void cli_credentials_set_anonymous(struct cli_credentials *cred)
* @retval true if anonymous, false if a username is specified
*/
bool cli_credentials_is_anonymous(struct cli_credentials *cred)
_PUBLIC_ bool cli_credentials_is_anonymous(struct cli_credentials *cred)
{
const char *username;
@ -763,7 +763,7 @@ bool cli_credentials_is_anonymous(struct cli_credentials *cred)
*
* @retval whether the credentials struct is finished
*/
bool cli_credentials_wrong_password(struct cli_credentials *cred)
_PUBLIC_ bool cli_credentials_wrong_password(struct cli_credentials *cred)
{
if (cred->password_obtained != CRED_CALLBACK_RESULT) {
return false;
@ -779,7 +779,7 @@ bool cli_credentials_wrong_password(struct cli_credentials *cred)
/*
set the common event context for this set of credentials
*/
void cli_credentials_set_event_context(struct cli_credentials *cred, struct event_context *ev)
_PUBLIC_ void cli_credentials_set_event_context(struct cli_credentials *cred, struct event_context *ev)
{
cred->ev = ev;
}
@ -787,7 +787,7 @@ void cli_credentials_set_event_context(struct cli_credentials *cred, struct even
/*
set the common event context for this set of credentials
*/
struct event_context *cli_credentials_get_event_context(struct cli_credentials *cred)
_PUBLIC_ struct event_context *cli_credentials_get_event_context(struct cli_credentials *cred)
{
if (cred->ev == NULL) {
cred->ev = event_context_find(cred);

View File

@ -132,6 +132,117 @@ struct ccache_container;
struct gssapi_creds_container;
#include "auth/credentials/credentials_proto.h"
const char *cli_credentials_get_workstation(struct cli_credentials *cred);
bool cli_credentials_set_workstation(struct cli_credentials *cred,
const char *val,
enum credentials_obtained obtained);
bool cli_credentials_is_anonymous(struct cli_credentials *cred);
struct cli_credentials *cli_credentials_init(TALLOC_CTX *mem_ctx);
void cli_credentials_set_anonymous(struct cli_credentials *cred);
bool cli_credentials_wrong_password(struct cli_credentials *cred);
const char *cli_credentials_get_password(struct cli_credentials *cred);
void cli_credentials_get_ntlm_username_domain(struct cli_credentials *cred, TALLOC_CTX *mem_ctx,
const char **username,
const char **domain);
NTSTATUS cli_credentials_get_ntlm_response(struct cli_credentials *cred, TALLOC_CTX *mem_ctx,
int *flags,
DATA_BLOB challenge, DATA_BLOB target_info,
DATA_BLOB *_lm_response, DATA_BLOB *_nt_response,
DATA_BLOB *_lm_session_key, DATA_BLOB *_session_key);
const char *cli_credentials_get_realm(struct cli_credentials *cred);
const char *cli_credentials_get_username(struct cli_credentials *cred);
int cli_credentials_get_krb5_context(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct smb_krb5_context **smb_krb5_context);
int cli_credentials_get_ccache(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct ccache_container **ccc);
int cli_credentials_get_keytab(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct keytab_container **_ktc);
const char *cli_credentials_get_domain(struct cli_credentials *cred);
struct creds_CredentialState *cli_credentials_get_netlogon_creds(struct cli_credentials *cred);
void cli_credentials_set_machine_account_pending(struct cli_credentials *cred,
struct loadparm_context *lp_ctx);
void cli_credentials_set_conf(struct cli_credentials *cred,
struct loadparm_context *lp_ctx);
const char *cli_credentials_get_principal(struct cli_credentials *cred, TALLOC_CTX *mem_ctx);
int cli_credentials_get_server_gss_creds(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct gssapi_creds_container **_gcc);
int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct gssapi_creds_container **_gcc);
void cli_credentials_set_event_context(struct cli_credentials *cred, struct event_context *ev);
void cli_credentials_set_kerberos_state(struct cli_credentials *creds,
enum credentials_use_kerberos use_kerberos);
struct event_context *cli_credentials_get_event_context(struct cli_credentials *cred);
bool cli_credentials_set_domain(struct cli_credentials *cred,
const char *val,
enum credentials_obtained obtained);
bool cli_credentials_set_username(struct cli_credentials *cred,
const char *val, enum credentials_obtained obtained);
bool cli_credentials_set_password(struct cli_credentials *cred,
const char *val,
enum credentials_obtained obtained);
struct cli_credentials *cli_credentials_init_anon(TALLOC_CTX *mem_ctx);
void cli_credentials_parse_string(struct cli_credentials *credentials, const char *data, enum credentials_obtained obtained);
const struct samr_Password *cli_credentials_get_nt_hash(struct cli_credentials *cred,
TALLOC_CTX *mem_ctx);
bool cli_credentials_set_realm(struct cli_credentials *cred,
const char *val,
enum credentials_obtained obtained);
void cli_credentials_set_secure_channel_type(struct cli_credentials *cred,
enum netr_SchannelType secure_channel_type);
void cli_credentials_set_netlogon_creds(struct cli_credentials *cred,
struct creds_CredentialState *netlogon_creds);
NTSTATUS cli_credentials_set_krb5_context(struct cli_credentials *cred,
struct smb_krb5_context *smb_krb5_context);
NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
const char *serviceprincipal);
NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cred,
struct loadparm_context *lp_ctx);
bool cli_credentials_authentication_requested(struct cli_credentials *cred);
void cli_credentials_guess(struct cli_credentials *cred,
struct loadparm_context *lp_ctx);
bool cli_credentials_set_bind_dn(struct cli_credentials *cred,
const char *bind_dn);
const char *cli_credentials_get_bind_dn(struct cli_credentials *cred);
bool cli_credentials_parse_file(struct cli_credentials *cred, const char *file, enum credentials_obtained obtained);
const char *cli_credentials_get_unparsed_name(struct cli_credentials *credentials, TALLOC_CTX *mem_ctx);
bool cli_credentials_set_password_callback(struct cli_credentials *cred,
const char *(*password_cb) (struct cli_credentials *));
enum netr_SchannelType cli_credentials_get_secure_channel_type(struct cli_credentials *cred);
void cli_credentials_set_kvno(struct cli_credentials *cred,
int kvno);
bool cli_credentials_set_nt_hash(struct cli_credentials *cred,
const struct samr_Password *nt_hash,
enum credentials_obtained obtained);
int cli_credentials_set_keytab_name(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
const char *keytab_name,
enum credentials_obtained obtained);
int cli_credentials_update_keytab(struct cli_credentials *cred,
struct loadparm_context *lp_ctx);
void cli_credentials_set_gensec_features(struct cli_credentials *creds, uint32_t gensec_features);
uint32_t cli_credentials_get_gensec_features(struct cli_credentials *creds);
int cli_credentials_set_ccache(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
const char *name,
enum credentials_obtained obtained);
bool cli_credentials_parse_password_file(struct cli_credentials *credentials, const char *file, enum credentials_obtained obtained);
bool cli_credentials_parse_password_fd(struct cli_credentials *credentials,
int fd, enum credentials_obtained obtained);
void cli_credentials_invalidate_ccache(struct cli_credentials *cred,
enum credentials_obtained obtained);
void cli_credentials_set_salt_principal(struct cli_credentials *cred, const char *principal);
enum credentials_use_kerberos cli_credentials_get_kerberos_state(struct cli_credentials *creds);
NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct ldb_context *ldb,
const char *base,
const char *filter);
int cli_credentials_get_kvno(struct cli_credentials *cred);
#endif /* __CREDENTIALS_H__ */

View File

@ -39,6 +39,10 @@ typedef struct cli_credentials cli_credentials;
$1 = NULL;
}
%constant int AUTO_USE_KERBEROS = CRED_AUTO_USE_KERBEROS;
%constant int DONT_USE_KERBEROS = CRED_DONT_USE_KERBEROS;
%constant int MUST_USE_KERBEROS = CRED_MUST_USE_KERBEROS;
%{
#include "librpc/gen_ndr/samr.h" /* for struct samr_Password */
%}
@ -52,7 +56,7 @@ typedef struct cli_credentials cli_credentials;
typedef struct cli_credentials {
%extend {
cli_credentials(void) {
return cli_credentials_init_anon(NULL);
return cli_credentials_init(NULL);
}
/* username */
const char *get_username(void);
@ -74,13 +78,18 @@ typedef struct cli_credentials {
bool set_realm(const char *val,
enum credentials_obtained=CRED_SPECIFIED);
/* Kerberos */
void set_kerberos_state(enum credentials_use_kerberos use_kerberos);
void parse_string(const char *text,
enum credentials_obtained=CRED_SPECIFIED);
enum credentials_obtained=CRED_SPECIFIED);
/* bind dn */
const char *get_bind_dn(void);
bool set_bind_dn(const char *bind_dn);
void set_anonymous();
/* workstation name */
const char *get_workstation(void);
bool set_workstation(const char *workstation,

View File

@ -58,6 +58,9 @@ def _swig_setattr_nondynamic_method(set):
import param
AUTO_USE_KERBEROS = _credentials.AUTO_USE_KERBEROS
DONT_USE_KERBEROS = _credentials.DONT_USE_KERBEROS
MUST_USE_KERBEROS = _credentials.MUST_USE_KERBEROS
class Credentials(object):
thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
@ -72,9 +75,11 @@ Credentials.get_domain = new_instancemethod(_credentials.Credentials_get_domain,
Credentials.set_domain = new_instancemethod(_credentials.Credentials_set_domain,None,Credentials)
Credentials.get_realm = new_instancemethod(_credentials.Credentials_get_realm,None,Credentials)
Credentials.set_realm = new_instancemethod(_credentials.Credentials_set_realm,None,Credentials)
Credentials.set_kerberos_state = new_instancemethod(_credentials.Credentials_set_kerberos_state,None,Credentials)
Credentials.parse_string = new_instancemethod(_credentials.Credentials_parse_string,None,Credentials)
Credentials.get_bind_dn = new_instancemethod(_credentials.Credentials_get_bind_dn,None,Credentials)
Credentials.set_bind_dn = new_instancemethod(_credentials.Credentials_set_bind_dn,None,Credentials)
Credentials.set_anonymous = new_instancemethod(_credentials.Credentials_set_anonymous,None,Credentials)
Credentials.get_workstation = new_instancemethod(_credentials.Credentials_get_workstation,None,Credentials)
Credentials.set_workstation = new_instancemethod(_credentials.Credentials_set_workstation,None,Credentials)
Credentials.guess = new_instancemethod(_credentials.Credentials_guess,None,Credentials)

View File

@ -39,7 +39,7 @@
* @param obtained This enum describes how 'specified' this password is
*/
bool cli_credentials_parse_password_fd(struct cli_credentials *credentials,
_PUBLIC_ bool cli_credentials_parse_password_fd(struct cli_credentials *credentials,
int fd, enum credentials_obtained obtained)
{
char *p;
@ -83,7 +83,7 @@ bool cli_credentials_parse_password_fd(struct cli_credentials *credentials,
* @param obtained This enum describes how 'specified' this password is
*/
bool cli_credentials_parse_password_file(struct cli_credentials *credentials, const char *file, enum credentials_obtained obtained)
_PUBLIC_ bool cli_credentials_parse_password_file(struct cli_credentials *credentials, const char *file, enum credentials_obtained obtained)
{
int fd = open(file, O_RDONLY, 0);
bool ret;
@ -109,7 +109,7 @@ bool cli_credentials_parse_password_file(struct cli_credentials *credentials, co
* @param obtained This enum describes how 'specified' this password is
*/
bool cli_credentials_parse_file(struct cli_credentials *cred, const char *file, enum credentials_obtained obtained)
_PUBLIC_ bool cli_credentials_parse_file(struct cli_credentials *cred, const char *file, enum credentials_obtained obtained)
{
uint16_t len = 0;
char *ptr, *val, *param;
@ -168,7 +168,7 @@ bool cli_credentials_parse_file(struct cli_credentials *cred, const char *file,
* @param cred Credentials structure to fill in
* @retval NTSTATUS error detailing any failure
*/
NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred,
_PUBLIC_ NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct ldb_context *ldb,
const char *base,
@ -326,7 +326,7 @@ NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred,
* @param cred Credentials structure to fill in
* @retval NTSTATUS error detailing any failure
*/
NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cred,
_PUBLIC_ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cred,
struct loadparm_context *lp_ctx)
{
char *filter;
@ -369,7 +369,7 @@ NTSTATUS cli_credentials_set_krbtgt(struct cli_credentials *cred,
* @param cred Credentials structure to fill in
* @retval NTSTATUS error detailing any failure
*/
NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *cred,
_PUBLIC_ NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
const char *serviceprincipal)
{
@ -395,7 +395,7 @@ NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *cred,
* than during, popt processing.
*
*/
void cli_credentials_set_machine_account_pending(struct cli_credentials *cred,
_PUBLIC_ void cli_credentials_set_machine_account_pending(struct cli_credentials *cred,
struct loadparm_context *lp_ctx)
{
cred->machine_account_pending = true;

View File

@ -25,10 +25,11 @@
#include "system/kerberos.h"
#include "auth/kerberos/kerberos.h"
#include "auth/credentials/credentials.h"
#include "auth/credentials/credentials_proto.h"
#include "auth/credentials/credentials_krb5.h"
#include "param/param.h"
int cli_credentials_get_krb5_context(struct cli_credentials *cred,
_PUBLIC_ int cli_credentials_get_krb5_context(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct smb_krb5_context **smb_krb5_context)
{
@ -52,7 +53,7 @@ int cli_credentials_get_krb5_context(struct cli_credentials *cred,
* otherwise we might have problems with the krb5 context already
* being here.
*/
NTSTATUS cli_credentials_set_krb5_context(struct cli_credentials *cred,
_PUBLIC_ NTSTATUS cli_credentials_set_krb5_context(struct cli_credentials *cred,
struct smb_krb5_context *smb_krb5_context)
{
if (!talloc_reference(cred, smb_krb5_context)) {
@ -126,7 +127,7 @@ static int free_dccache(struct ccache_container *ccc) {
return 0;
}
int cli_credentials_set_ccache(struct cli_credentials *cred,
_PUBLIC_ int cli_credentials_set_ccache(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
const char *name,
enum credentials_obtained obtained)
@ -251,7 +252,7 @@ static int cli_credentials_new_ccache(struct cli_credentials *cred,
return ret;
}
int cli_credentials_get_ccache(struct cli_credentials *cred,
_PUBLIC_ int cli_credentials_get_ccache(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct ccache_container **ccc)
{
@ -315,7 +316,7 @@ void cli_credentials_invalidate_client_gss_creds(struct cli_credentials *cred,
}
}
void cli_credentials_invalidate_ccache(struct cli_credentials *cred,
_PUBLIC_ void cli_credentials_invalidate_ccache(struct cli_credentials *cred,
enum credentials_obtained obtained)
{
/* If the caller just changed the username/password etc, then
@ -346,7 +347,7 @@ static int free_gssapi_creds(struct gssapi_creds_container *gcc)
return 0;
}
int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
_PUBLIC_ int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct gssapi_creds_container **_gcc)
{
@ -454,7 +455,7 @@ int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
* attached to this context. If this hasn't been done or set before,
* it will be generated from the password.
*/
int cli_credentials_get_keytab(struct cli_credentials *cred,
_PUBLIC_ int cli_credentials_get_keytab(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct keytab_container **_ktc)
{
@ -508,7 +509,7 @@ int cli_credentials_get_keytab(struct cli_credentials *cred,
/* Given the name of a keytab (presumably in the format
* FILE:/etc/krb5.keytab), open it and attach it */
int cli_credentials_set_keytab_name(struct cli_credentials *cred,
_PUBLIC_ int cli_credentials_set_keytab_name(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
const char *keytab_name,
enum credentials_obtained obtained)
@ -547,7 +548,7 @@ int cli_credentials_set_keytab_name(struct cli_credentials *cred,
return ret;
}
int cli_credentials_update_keytab(struct cli_credentials *cred,
_PUBLIC_ int cli_credentials_update_keytab(struct cli_credentials *cred,
struct loadparm_context *lp_ctx)
{
krb5_error_code ret;
@ -583,7 +584,7 @@ int cli_credentials_update_keytab(struct cli_credentials *cred,
/* Get server gss credentials (in gsskrb5, this means the keytab) */
int cli_credentials_get_server_gss_creds(struct cli_credentials *cred,
_PUBLIC_ int cli_credentials_get_server_gss_creds(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct gssapi_creds_container **_gcc)
{
@ -657,7 +658,7 @@ int cli_credentials_get_server_gss_creds(struct cli_credentials *cred,
* Set Kerberos KVNO
*/
void cli_credentials_set_kvno(struct cli_credentials *cred,
_PUBLIC_ void cli_credentials_set_kvno(struct cli_credentials *cred,
int kvno)
{
cred->kvno = kvno;
@ -667,7 +668,7 @@ void cli_credentials_set_kvno(struct cli_credentials *cred,
* Return Kerberos KVNO
*/
int cli_credentials_get_kvno(struct cli_credentials *cred)
_PUBLIC_ int cli_credentials_get_kvno(struct cli_credentials *cred)
{
return cred->kvno;
}
@ -693,7 +694,7 @@ const char *cli_credentials_get_salt_principal(struct cli_credentials *cred)
return cred->salt_principal;
}
void cli_credentials_set_salt_principal(struct cli_credentials *cred, const char *principal)
_PUBLIC_ void cli_credentials_set_salt_principal(struct cli_credentials *cred, const char *principal)
{
cred->salt_principal = talloc_strdup(cred, principal);
}

View File

@ -27,7 +27,7 @@
#include "libcli/auth/libcli_auth.h"
#include "auth/credentials/credentials.h"
void cli_credentials_get_ntlm_username_domain(struct cli_credentials *cred, TALLOC_CTX *mem_ctx,
_PUBLIC_ void cli_credentials_get_ntlm_username_domain(struct cli_credentials *cred, TALLOC_CTX *mem_ctx,
const char **username,
const char **domain)
{
@ -40,7 +40,7 @@ void cli_credentials_get_ntlm_username_domain(struct cli_credentials *cred, TALL
}
}
NTSTATUS cli_credentials_get_ntlm_response(struct cli_credentials *cred, TALLOC_CTX *mem_ctx,
_PUBLIC_ NTSTATUS cli_credentials_get_ntlm_response(struct cli_credentials *cred, TALLOC_CTX *mem_ctx,
int *flags,
DATA_BLOB challenge, DATA_BLOB target_info,
DATA_BLOB *_lm_response, DATA_BLOB *_nt_response,

View File

@ -2462,7 +2462,7 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
#define SWIGTYPE_p_int swig_types[3]
#define SWIGTYPE_p_loadparm_context swig_types[4]
#define SWIGTYPE_p_loadparm_service swig_types[5]
#define SWIGTYPE_p_long_long swig_types[6]
#define SWIGTYPE_p_long swig_types[6]
#define SWIGTYPE_p_param_context swig_types[7]
#define SWIGTYPE_p_param_opt swig_types[8]
#define SWIGTYPE_p_param_section swig_types[9]
@ -2470,7 +2470,7 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
#define SWIGTYPE_p_signed_char swig_types[11]
#define SWIGTYPE_p_unsigned_char swig_types[12]
#define SWIGTYPE_p_unsigned_int swig_types[13]
#define SWIGTYPE_p_unsigned_long_long swig_types[14]
#define SWIGTYPE_p_unsigned_long swig_types[14]
#define SWIGTYPE_p_unsigned_short swig_types[15]
static swig_type_info *swig_types[17];
static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0};
@ -2525,10 +2525,20 @@ static swig_module_info swig_module = {swig_types, 16, 0, 0, 0, 0};
typedef struct cli_credentials cli_credentials;
#define SWIG_From_long PyInt_FromLong
SWIGINTERNINLINE PyObject *
SWIG_From_int (int value)
{
return SWIG_From_long (value);
}
#include "librpc/gen_ndr/samr.h" /* for struct samr_Password */
SWIGINTERN cli_credentials *new_cli_credentials(){
return cli_credentials_init_anon(NULL);
return cli_credentials_init(NULL);
}
SWIGINTERN swig_type_info*
@ -3131,6 +3141,44 @@ fail:
}
SWIGINTERN PyObject *_wrap_Credentials_set_kerberos_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
cli_credentials *arg1 = (cli_credentials *) 0 ;
enum credentials_use_kerberos arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
int val2 ;
int ecode2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char * kwnames[] = {
(char *) "self",(char *) "use_kerberos", NULL
};
arg1 = NULL;
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:Credentials_set_kerberos_state",kwnames,&obj0,&obj1)) SWIG_fail;
if (obj0) {
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_set_kerberos_state" "', argument " "1"" of type '" "cli_credentials *""'");
}
arg1 = (cli_credentials *)(argp1);
}
if (obj1) {
ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Credentials_set_kerberos_state" "', argument " "2"" of type '" "enum credentials_use_kerberos""'");
}
arg2 = (enum credentials_use_kerberos)(val2);
}
cli_credentials_set_kerberos_state(arg1,arg2);
resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_Credentials_parse_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
cli_credentials *arg1 = (cli_credentials *) 0 ;
@ -3253,6 +3301,33 @@ fail:
}
SWIGINTERN PyObject *_wrap_Credentials_set_anonymous(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
cli_credentials *arg1 = (cli_credentials *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
char * kwnames[] = {
(char *) "self", NULL
};
arg1 = NULL;
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Credentials_set_anonymous",kwnames,&obj0)) SWIG_fail;
if (obj0) {
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_cli_credentials, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Credentials_set_anonymous" "', argument " "1"" of type '" "cli_credentials *""'");
}
arg1 = (cli_credentials *)(argp1);
}
cli_credentials_set_anonymous(arg1);
resultobj = SWIG_Py_Void();
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_Credentials_get_workstation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0;
cli_credentials *arg1 = (cli_credentials *) 0 ;
@ -3564,9 +3639,11 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Credentials_set_domain", (PyCFunction) _wrap_Credentials_set_domain, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_get_realm", (PyCFunction) _wrap_Credentials_get_realm, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_set_realm", (PyCFunction) _wrap_Credentials_set_realm, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_set_kerberos_state", (PyCFunction) _wrap_Credentials_set_kerberos_state, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_parse_string", (PyCFunction) _wrap_Credentials_parse_string, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_get_bind_dn", (PyCFunction) _wrap_Credentials_get_bind_dn, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_set_bind_dn", (PyCFunction) _wrap_Credentials_set_bind_dn, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_set_anonymous", (PyCFunction) _wrap_Credentials_set_anonymous, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_get_workstation", (PyCFunction) _wrap_Credentials_get_workstation, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_set_workstation", (PyCFunction) _wrap_Credentials_set_workstation, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"Credentials_guess", (PyCFunction) _wrap_Credentials_guess, METH_VARARGS | METH_KEYWORDS, NULL},
@ -3587,18 +3664,18 @@ static PyMethodDef SwigMethods[] = {
static swig_type_info _swigt__p_TALLOC_CTX = {"_p_TALLOC_CTX", "TALLOC_CTX *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_cli_credentials = {"_p_cli_credentials", "struct cli_credentials *|cli_credentials *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "intptr_t *|int *|int_least32_t *|int_fast32_t *|int32_t *|int_fast16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *|int_least32_t *|int32_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_loadparm_context = {"_p_loadparm_context", "struct loadparm_context *|loadparm_context *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_loadparm_service = {"_p_loadparm_service", "struct loadparm_service *|loadparm_service *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long_long = {"_p_long_long", "int_least64_t *|int_fast64_t *|int64_t *|long long *|intmax_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long = {"_p_long", "intptr_t *|int_least64_t *|int_fast32_t *|int_fast64_t *|int64_t *|long *|int_fast16_t *|intmax_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_param_context = {"_p_param_context", "struct param_context *|param *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_param_opt = {"_p_param_opt", "struct param_opt *|param_opt *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_param_section = {"_p_param_section", "struct param_section *|param_section *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_short = {"_p_short", "short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int_least8_t *|int_fast8_t *|int8_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint_least8_t *|uint_fast8_t *|uint8_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uintptr_t *|uint_least32_t *|uint_fast32_t *|uint32_t *|unsigned int *|uint_fast16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint_least64_t *|uint_fast64_t *|uint64_t *|unsigned long long *|uintmax_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint_least32_t *|uint32_t *|unsigned int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "uintptr_t *|uint_least64_t *|uint_fast32_t *|uint_fast64_t *|uint64_t *|unsigned long *|uint_fast16_t *|uintmax_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0};
static swig_type_info *swig_type_initial[] = {
@ -3608,7 +3685,7 @@ static swig_type_info *swig_type_initial[] = {
&_swigt__p_int,
&_swigt__p_loadparm_context,
&_swigt__p_loadparm_service,
&_swigt__p_long_long,
&_swigt__p_long,
&_swigt__p_param_context,
&_swigt__p_param_opt,
&_swigt__p_param_section,
@ -3616,7 +3693,7 @@ static swig_type_info *swig_type_initial[] = {
&_swigt__p_signed_char,
&_swigt__p_unsigned_char,
&_swigt__p_unsigned_int,
&_swigt__p_unsigned_long_long,
&_swigt__p_unsigned_long,
&_swigt__p_unsigned_short,
};
@ -3626,7 +3703,7 @@ static swig_cast_info _swigc__p_cli_credentials[] = { {&_swigt__p_cli_credentia
static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_loadparm_context[] = { {&_swigt__p_loadparm_context, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_loadparm_service[] = { {&_swigt__p_loadparm_service, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_param_context[] = { {&_swigt__p_param_context, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_param_opt[] = { {&_swigt__p_param_opt, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_param_section[] = { {&_swigt__p_param_section, 0, 0, 0},{0, 0, 0, 0}};
@ -3634,7 +3711,7 @@ static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0,
static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info *swig_cast_initial[] = {
@ -3644,7 +3721,7 @@ static swig_cast_info *swig_cast_initial[] = {
_swigc__p_int,
_swigc__p_loadparm_context,
_swigc__p_loadparm_service,
_swigc__p_long_long,
_swigc__p_long,
_swigc__p_param_context,
_swigc__p_param_opt,
_swigc__p_param_section,
@ -3652,7 +3729,7 @@ static swig_cast_info *swig_cast_initial[] = {
_swigc__p_signed_char,
_swigc__p_unsigned_char,
_swigc__p_unsigned_int,
_swigc__p_unsigned_long_long,
_swigc__p_unsigned_long,
_swigc__p_unsigned_short,
};
@ -4174,5 +4251,8 @@ SWIGEXPORT void SWIG_init(void) {
SWIG_InstallConstants(d,swig_const_table);
SWIG_Python_SetConstant(d, "AUTO_USE_KERBEROS",SWIG_From_int((int)(CRED_AUTO_USE_KERBEROS)));
SWIG_Python_SetConstant(d, "DONT_USE_KERBEROS",SWIG_From_int((int)(CRED_DONT_USE_KERBEROS)));
SWIG_Python_SetConstant(d, "MUST_USE_KERBEROS",SWIG_From_int((int)(CRED_MUST_USE_KERBEROS)));
}

View File

@ -67,6 +67,8 @@ class CredentialsTests(unittest.TestCase):
self.assertTrue(self.creds.is_anonymous())
self.creds.set_username("somebody")
self.assertFalse(self.creds.is_anonymous())
self.creds.set_anonymous()
self.assertTrue(self.creds.is_anonymous())
def test_workstation(self):
# FIXME: This is uninitialised, it should be None

View File

@ -13,7 +13,7 @@ gensec_VERSION = 0.0.1
gensec_SOVERSION = 0
gensec_OBJ_FILES = $(addprefix auth/gensec/, gensec.o socket.o)
PUBLIC_HEADERS += $(addprefix auth/gensec/, gensec.h spnego.h)
PUBLIC_HEADERS += auth/gensec/gensec.h
################################################
# Start MODULE gensec_krb5

View File

@ -23,6 +23,7 @@
#include "auth/auth.h"
#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec.h"
#include "auth/gensec/gensec_proto.h"
#include "lib/socket/socket.h"
#include <sasl/sasl.h>

View File

@ -26,6 +26,7 @@
#include "librpc/rpc/dcerpc.h"
#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec.h"
#include "auth/gensec/gensec_proto.h"
#include "param/param.h"
/* the list of currently registered GENSEC backends */
@ -34,7 +35,7 @@ static int gensec_num_backends;
/* Return all the registered mechs. Don't modify the return pointer,
* but you may talloc_reference it if convient */
struct gensec_security_ops **gensec_security_all(void)
_PUBLIC_ struct gensec_security_ops **gensec_security_all(void)
{
return generic_security_ops;
}
@ -44,7 +45,7 @@ struct gensec_security_ops **gensec_security_all(void)
* gensec_security_all(), or from cli_credentials_gensec_list() (ie,
* an existing list we have trimmed down) */
struct gensec_security_ops **gensec_use_kerberos_mechs(TALLOC_CTX *mem_ctx,
_PUBLIC_ struct gensec_security_ops **gensec_use_kerberos_mechs(TALLOC_CTX *mem_ctx,
struct gensec_security_ops **old_gensec_list,
struct cli_credentials *creds)
{
@ -571,7 +572,7 @@ _PUBLIC_ NTSTATUS gensec_client_start(TALLOC_CTX *mem_ctx,
@param gensec_security Returned GENSEC context pointer.
@note The mem_ctx is only a parent and may be NULL.
*/
NTSTATUS gensec_server_start(TALLOC_CTX *mem_ctx,
_PUBLIC_ NTSTATUS gensec_server_start(TALLOC_CTX *mem_ctx,
struct event_context *ev,
struct loadparm_context *lp_ctx,
struct messaging_context *msg,
@ -636,7 +637,7 @@ static NTSTATUS gensec_start_mech(struct gensec_security *gensec_security)
* @param auth_level DCERPC auth level
*/
NTSTATUS gensec_start_mech_by_authtype(struct gensec_security *gensec_security,
_PUBLIC_ NTSTATUS gensec_start_mech_by_authtype(struct gensec_security *gensec_security,
uint8_t auth_type, uint8_t auth_level)
{
gensec_security->ops = gensec_security_by_authtype(gensec_security, auth_type);
@ -662,7 +663,7 @@ NTSTATUS gensec_start_mech_by_authtype(struct gensec_security *gensec_security,
return gensec_start_mech(gensec_security);
}
const char *gensec_get_name_by_authtype(uint8_t authtype)
_PUBLIC_ const char *gensec_get_name_by_authtype(uint8_t authtype)
{
const struct gensec_security_ops *ops;
ops = gensec_security_by_authtype(NULL, authtype);
@ -673,7 +674,7 @@ const char *gensec_get_name_by_authtype(uint8_t authtype)
}
const char *gensec_get_name_by_oid(const char *oid_string)
_PUBLIC_ const char *gensec_get_name_by_oid(const char *oid_string)
{
const struct gensec_security_ops *ops;
ops = gensec_security_by_oid(NULL, oid_string);
@ -703,7 +704,7 @@ NTSTATUS gensec_start_mech_by_ops(struct gensec_security *gensec_security,
* well-known #define to hook it in.
*/
NTSTATUS gensec_start_mech_by_oid(struct gensec_security *gensec_security,
_PUBLIC_ NTSTATUS gensec_start_mech_by_oid(struct gensec_security *gensec_security,
const char *mech_oid)
{
gensec_security->ops = gensec_security_by_oid(gensec_security, mech_oid);
@ -719,7 +720,7 @@ NTSTATUS gensec_start_mech_by_oid(struct gensec_security *gensec_security,
*
*/
NTSTATUS gensec_start_mech_by_sasl_name(struct gensec_security *gensec_security,
_PUBLIC_ NTSTATUS gensec_start_mech_by_sasl_name(struct gensec_security *gensec_security,
const char *sasl_name)
{
gensec_security->ops = gensec_security_by_sasl_name(gensec_security, sasl_name);
@ -768,7 +769,7 @@ _PUBLIC_ NTSTATUS gensec_start_mech_by_sasl_list(struct gensec_security *gensec_
*
*/
NTSTATUS gensec_start_mech_by_name(struct gensec_security *gensec_security,
_PUBLIC_ NTSTATUS gensec_start_mech_by_name(struct gensec_security *gensec_security,
const char *name)
{
gensec_security->ops = gensec_security_by_name(gensec_security, name);
@ -782,7 +783,7 @@ NTSTATUS gensec_start_mech_by_name(struct gensec_security *gensec_security,
/*
wrappers for the gensec function pointers
*/
NTSTATUS gensec_unseal_packet(struct gensec_security *gensec_security,
_PUBLIC_ NTSTATUS gensec_unseal_packet(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
uint8_t *data, size_t length,
const uint8_t *whole_pdu, size_t pdu_length,
@ -801,7 +802,7 @@ NTSTATUS gensec_unseal_packet(struct gensec_security *gensec_security,
sig);
}
NTSTATUS gensec_check_packet(struct gensec_security *gensec_security,
_PUBLIC_ NTSTATUS gensec_check_packet(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
const uint8_t *data, size_t length,
const uint8_t *whole_pdu, size_t pdu_length,
@ -817,7 +818,7 @@ NTSTATUS gensec_check_packet(struct gensec_security *gensec_security,
return gensec_security->ops->check_packet(gensec_security, mem_ctx, data, length, whole_pdu, pdu_length, sig);
}
NTSTATUS gensec_seal_packet(struct gensec_security *gensec_security,
_PUBLIC_ NTSTATUS gensec_seal_packet(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
uint8_t *data, size_t length,
const uint8_t *whole_pdu, size_t pdu_length,
@ -833,7 +834,7 @@ NTSTATUS gensec_seal_packet(struct gensec_security *gensec_security,
return gensec_security->ops->seal_packet(gensec_security, mem_ctx, data, length, whole_pdu, pdu_length, sig);
}
NTSTATUS gensec_sign_packet(struct gensec_security *gensec_security,
_PUBLIC_ NTSTATUS gensec_sign_packet(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
const uint8_t *data, size_t length,
const uint8_t *whole_pdu, size_t pdu_length,
@ -849,7 +850,7 @@ NTSTATUS gensec_sign_packet(struct gensec_security *gensec_security,
return gensec_security->ops->sign_packet(gensec_security, mem_ctx, data, length, whole_pdu, pdu_length, sig);
}
size_t gensec_sig_size(struct gensec_security *gensec_security, size_t data_size)
_PUBLIC_ size_t gensec_sig_size(struct gensec_security *gensec_security, size_t data_size)
{
if (!gensec_security->ops->sig_size) {
return 0;
@ -879,7 +880,7 @@ size_t gensec_max_input_size(struct gensec_security *gensec_security)
return gensec_security->ops->max_input_size(gensec_security);
}
NTSTATUS gensec_wrap(struct gensec_security *gensec_security,
_PUBLIC_ NTSTATUS gensec_wrap(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
const DATA_BLOB *in,
DATA_BLOB *out)
@ -890,7 +891,7 @@ NTSTATUS gensec_wrap(struct gensec_security *gensec_security,
return gensec_security->ops->wrap(gensec_security, mem_ctx, in, out);
}
NTSTATUS gensec_unwrap(struct gensec_security *gensec_security,
_PUBLIC_ NTSTATUS gensec_unwrap(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
const DATA_BLOB *in,
DATA_BLOB *out)
@ -901,7 +902,7 @@ NTSTATUS gensec_unwrap(struct gensec_security *gensec_security,
return gensec_security->ops->unwrap(gensec_security, mem_ctx, in, out);
}
NTSTATUS gensec_session_key(struct gensec_security *gensec_security,
_PUBLIC_ NTSTATUS gensec_session_key(struct gensec_security *gensec_security,
DATA_BLOB *session_key)
{
if (!gensec_security->ops->session_key) {
@ -924,7 +925,7 @@ NTSTATUS gensec_session_key(struct gensec_security *gensec_security,
*
*/
NTSTATUS gensec_session_info(struct gensec_security *gensec_security,
_PUBLIC_ NTSTATUS gensec_session_info(struct gensec_security *gensec_security,
struct auth_session_info **session_info)
{
if (!gensec_security->ops->session_info) {
@ -1064,7 +1065,7 @@ _PUBLIC_ NTSTATUS gensec_set_credentials(struct gensec_security *gensec_security
*
*/
struct cli_credentials *gensec_get_credentials(struct gensec_security *gensec_security)
_PUBLIC_ struct cli_credentials *gensec_get_credentials(struct gensec_security *gensec_security)
{
if (!gensec_security) {
return NULL;
@ -1134,7 +1135,7 @@ _PUBLIC_ const char *gensec_get_target_hostname(struct gensec_security *gensec_s
* cryptographic tokens, to avoid certain attacks.
*/
NTSTATUS gensec_set_my_addr(struct gensec_security *gensec_security, struct socket_address *my_addr)
_PUBLIC_ NTSTATUS gensec_set_my_addr(struct gensec_security *gensec_security, struct socket_address *my_addr)
{
gensec_security->my_addr = my_addr;
if (my_addr && !talloc_reference(gensec_security, my_addr)) {
@ -1143,7 +1144,7 @@ NTSTATUS gensec_set_my_addr(struct gensec_security *gensec_security, struct sock
return NT_STATUS_OK;
}
NTSTATUS gensec_set_peer_addr(struct gensec_security *gensec_security, struct socket_address *peer_addr)
_PUBLIC_ NTSTATUS gensec_set_peer_addr(struct gensec_security *gensec_security, struct socket_address *peer_addr)
{
gensec_security->peer_addr = peer_addr;
if (peer_addr && !talloc_reference(gensec_security, peer_addr)) {
@ -1163,7 +1164,7 @@ struct socket_address *gensec_get_my_addr(struct gensec_security *gensec_securit
return NULL;
}
struct socket_address *gensec_get_peer_addr(struct gensec_security *gensec_security)
_PUBLIC_ struct socket_address *gensec_get_peer_addr(struct gensec_security *gensec_security)
{
if (gensec_security->peer_addr) {
return gensec_security->peer_addr;
@ -1263,7 +1264,7 @@ static int sort_gensec(struct gensec_security_ops **gs1, struct gensec_security_
/*
initialise the GENSEC subsystem
*/
NTSTATUS gensec_init(struct loadparm_context *lp_ctx)
_PUBLIC_ NTSTATUS gensec_init(struct loadparm_context *lp_ctx)
{
static bool initialized = false;
extern NTSTATUS gensec_sasl_init(void);

View File

@ -199,6 +199,96 @@ NTSTATUS gensec_packet_full_request(struct gensec_security *gensec_security,
struct loadparm_context;
#include "auth/gensec/gensec_proto.h"
NTSTATUS gensec_subcontext_start(TALLOC_CTX *mem_ctx,
struct gensec_security *parent,
struct gensec_security **gensec_security);
NTSTATUS gensec_client_start(TALLOC_CTX *mem_ctx,
struct gensec_security **gensec_security,
struct event_context *ev,
struct loadparm_context *lp_ctx);
NTSTATUS gensec_start_mech_by_sasl_list(struct gensec_security *gensec_security,
const char **sasl_names);
NTSTATUS gensec_update(struct gensec_security *gensec_security, TALLOC_CTX *out_mem_ctx,
const DATA_BLOB in, DATA_BLOB *out);
void gensec_update_send(struct gensec_security *gensec_security, const DATA_BLOB in,
void (*callback)(struct gensec_update_request *req, void *private_data),
void *private_data);
NTSTATUS gensec_update_recv(struct gensec_update_request *req, TALLOC_CTX *out_mem_ctx, DATA_BLOB *out);
void gensec_want_feature(struct gensec_security *gensec_security,
uint32_t feature);
bool gensec_have_feature(struct gensec_security *gensec_security,
uint32_t feature);
NTSTATUS gensec_set_credentials(struct gensec_security *gensec_security, struct cli_credentials *credentials);
NTSTATUS gensec_set_target_service(struct gensec_security *gensec_security, const char *service);
const char *gensec_get_target_service(struct gensec_security *gensec_security);
NTSTATUS gensec_set_target_hostname(struct gensec_security *gensec_security, const char *hostname);
const char *gensec_get_target_hostname(struct gensec_security *gensec_security);
NTSTATUS gensec_session_key(struct gensec_security *gensec_security,
DATA_BLOB *session_key);
NTSTATUS gensec_start_mech_by_oid(struct gensec_security *gensec_security,
const char *mech_oid);
const char *gensec_get_name_by_oid(const char *oid_string);
struct cli_credentials *gensec_get_credentials(struct gensec_security *gensec_security);
struct socket_address *gensec_get_peer_addr(struct gensec_security *gensec_security);
NTSTATUS gensec_init(struct loadparm_context *lp_ctx);
NTSTATUS gensec_unseal_packet(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
uint8_t *data, size_t length,
const uint8_t *whole_pdu, size_t pdu_length,
const DATA_BLOB *sig);
NTSTATUS gensec_check_packet(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
const uint8_t *data, size_t length,
const uint8_t *whole_pdu, size_t pdu_length,
const DATA_BLOB *sig);
size_t gensec_sig_size(struct gensec_security *gensec_security, size_t data_size);
NTSTATUS gensec_seal_packet(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
uint8_t *data, size_t length,
const uint8_t *whole_pdu, size_t pdu_length,
DATA_BLOB *sig);
NTSTATUS gensec_sign_packet(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
const uint8_t *data, size_t length,
const uint8_t *whole_pdu, size_t pdu_length,
DATA_BLOB *sig);
NTSTATUS gensec_start_mech_by_authtype(struct gensec_security *gensec_security,
uint8_t auth_type, uint8_t auth_level);
const char *gensec_get_name_by_authtype(uint8_t authtype);
NTSTATUS gensec_server_start(TALLOC_CTX *mem_ctx,
struct event_context *ev,
struct loadparm_context *lp_ctx,
struct messaging_context *msg,
struct gensec_security **gensec_security);
NTSTATUS gensec_session_info(struct gensec_security *gensec_security,
struct auth_session_info **session_info);
NTSTATUS auth_nt_status_squash(NTSTATUS nt_status);
struct creds_CredentialState;
NTSTATUS dcerpc_schannel_creds(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
struct creds_CredentialState **creds);
NTSTATUS gensec_set_peer_addr(struct gensec_security *gensec_security, struct socket_address *peer_addr);
NTSTATUS gensec_set_my_addr(struct gensec_security *gensec_security, struct socket_address *my_addr);
NTSTATUS gensec_start_mech_by_name(struct gensec_security *gensec_security,
const char *name);
NTSTATUS gensec_unwrap(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
const DATA_BLOB *in,
DATA_BLOB *out);
NTSTATUS gensec_wrap(struct gensec_security *gensec_security,
TALLOC_CTX *mem_ctx,
const DATA_BLOB *in,
DATA_BLOB *out);
struct gensec_security_ops **gensec_security_all(void);
struct gensec_security_ops **gensec_use_kerberos_mechs(TALLOC_CTX *mem_ctx,
struct gensec_security_ops **old_gensec_list,
struct cli_credentials *creds);
NTSTATUS gensec_start_mech_by_sasl_name(struct gensec_security *gensec_security,
const char *sasl_name);
#endif /* __GENSEC_H__ */

View File

@ -34,7 +34,9 @@
#include "auth/credentials/credentials.h"
#include "auth/credentials/credentials_krb5.h"
#include "auth/gensec/gensec.h"
#include "auth/gensec/gensec_proto.h"
#include "param/param.h"
#include "auth/session_proto.h"
enum gensec_gssapi_sasl_state
{

View File

@ -36,7 +36,9 @@
#include "auth/credentials/credentials.h"
#include "auth/credentials/credentials_krb5.h"
#include "auth/gensec/gensec.h"
#include "auth/gensec/gensec_proto.h"
#include "param/param.h"
#include "auth/session_proto.h"
enum GENSEC_KRB5_STATE {
GENSEC_KRB5_SERVER_START,

View File

@ -25,11 +25,13 @@
#include "auth/auth.h"
#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec.h"
#include "auth/gensec/gensec_proto.h"
#include "auth/gensec/schannel.h"
#include "auth/gensec/schannel_state.h"
#include "auth/gensec/schannel_proto.h"
#include "librpc/rpc/dcerpc.h"
#include "param/param.h"
#include "auth/session_proto.h"
static size_t schannel_sig_size(struct gensec_security *gensec_security, size_t data_size)
{

View File

@ -24,6 +24,7 @@
#include "lib/socket/socket.h"
#include "lib/stream/packet.h"
#include "auth/gensec/gensec.h"
#include "auth/gensec/gensec_proto.h"
static const struct socket_ops gensec_socket_ops;

View File

@ -26,6 +26,7 @@
#include "librpc/gen_ndr/ndr_dcerpc.h"
#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec.h"
#include "auth/gensec/gensec_proto.h"
enum spnego_state_position {
SPNEGO_SERVER_START,

View File

@ -24,6 +24,7 @@
#include "system/kerberos.h"
#include "auth/kerberos/kerberos.h"
#include "auth/credentials/credentials.h"
#include "auth/credentials/credentials_proto.h"
#include "auth/credentials/credentials_krb5.h"
struct principal_container {
@ -634,7 +635,7 @@ int smb_krb5_update_keytab(TALLOC_CTX *parent_ctx,
return ret;
}
_PUBLIC_ int smb_krb5_create_memory_keytab(TALLOC_CTX *parent_ctx,
int smb_krb5_create_memory_keytab(TALLOC_CTX *parent_ctx,
struct cli_credentials *machine_account,
struct smb_krb5_context *smb_krb5_context,
const char **enctype_strings,

View File

@ -27,7 +27,9 @@
#include "librpc/gen_ndr/ndr_dcerpc.h"
#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec.h"
#include "auth/gensec/gensec_proto.h"
#include "auth/auth.h"
#include "auth/auth_proto.h"
#include "param/param.h"
/**

View File

@ -186,4 +186,5 @@ struct gensec_ntlmssp_state
struct loadparm_context;
struct auth_session_info;
#include "auth/ntlmssp/proto.h"

View File

@ -30,7 +30,9 @@
#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec.h"
#include "auth/auth.h"
#include "auth/auth_proto.h"
#include "param/param.h"
#include "auth/session_proto.h"
/**
* Set a username on an NTLMSSP context - ensures it is talloc()ed

View File

@ -134,7 +134,7 @@ static NTSTATUS ntlmssp_make_packet_signature(struct gensec_ntlmssp_state *gense
}
/* TODO: make this non-public */
_PUBLIC_ NTSTATUS gensec_ntlmssp_sign_packet(struct gensec_security *gensec_security,
NTSTATUS gensec_ntlmssp_sign_packet(struct gensec_security *gensec_security,
TALLOC_CTX *sig_mem_ctx,
const uint8_t *data, size_t length,
const uint8_t *whole_pdu, size_t pdu_length,
@ -306,7 +306,7 @@ NTSTATUS gensec_ntlmssp_unseal_packet(struct gensec_security *gensec_security,
Initialise the state for NTLMSSP signing.
*/
/* TODO: make this non-public */
_PUBLIC_ NTSTATUS ntlmssp_sign_init(struct gensec_ntlmssp_state *gensec_ntlmssp_state)
NTSTATUS ntlmssp_sign_init(struct gensec_ntlmssp_state *gensec_ntlmssp_state)
{
TALLOC_CTX *mem_ctx = talloc_new(gensec_ntlmssp_state);

View File

@ -383,7 +383,7 @@ _PUBLIC_ NTSTATUS authsam_make_server_info(TALLOC_CTX *mem_ctx, struct ldb_conte
return NT_STATUS_OK;
}
_PUBLIC_ NTSTATUS sam_get_results_principal(struct ldb_context *sam_ctx,
NTSTATUS sam_get_results_principal(struct ldb_context *sam_ctx,
TALLOC_CTX *mem_ctx, const char *principal,
struct ldb_message ***msgs,
struct ldb_message ***msgs_domain_ref)

View File

@ -28,8 +28,9 @@
#include "dsdb/samdb/samdb.h"
#include "auth/credentials/credentials.h"
#include "param/param.h"
#include "auth/session_proto.h"
struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx,
_PUBLIC_ struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx)
{
NTSTATUS nt_status;
@ -41,7 +42,7 @@ struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx,
return session_info;
}
NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx,
_PUBLIC_ NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx,
struct loadparm_context *lp_ctx,
struct auth_session_info **_session_info)
{
@ -77,7 +78,7 @@ NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx,
return NT_STATUS_OK;
}
NTSTATUS auth_anonymous_server_info(TALLOC_CTX *mem_ctx,
_PUBLIC_ NTSTATUS auth_anonymous_server_info(TALLOC_CTX *mem_ctx,
const char *netbios_name,
struct auth_serversupplied_info **_server_info)
{
@ -149,7 +150,7 @@ NTSTATUS auth_anonymous_server_info(TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
NTSTATUS auth_generate_session_info(TALLOC_CTX *mem_ctx,
_PUBLIC_ NTSTATUS auth_generate_session_info(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
struct auth_serversupplied_info *server_info,
struct auth_session_info **_session_info)
@ -199,7 +200,7 @@ void auth_session_info_debug(int dbg_lev,
/**
* Make a server_info struct from the info3 returned by a domain logon
*/
NTSTATUS make_server_info_netlogon_validation(TALLOC_CTX *mem_ctx,
_PUBLIC_ NTSTATUS make_server_info_netlogon_validation(TALLOC_CTX *mem_ctx,
const char *account_name,
uint16_t validation_level,
union netr_Validation *validation,

View File

@ -29,6 +29,28 @@ struct auth_session_info {
};
#include "librpc/gen_ndr/netlogon.h"
#include "auth/session_proto.h"
struct auth_session_info *system_session_anon(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
struct auth_session_info *system_session(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) ;
NTSTATUS auth_anonymous_server_info(TALLOC_CTX *mem_ctx,
const char *netbios_name,
struct auth_serversupplied_info **_server_info) ;
NTSTATUS auth_generate_session_info(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
struct auth_serversupplied_info *server_info,
struct auth_session_info **_session_info) ;
NTSTATUS make_server_info_netlogon_validation(TALLOC_CTX *mem_ctx,
const char *account_name,
uint16_t validation_level,
union netr_Validation *validation,
struct auth_serversupplied_info **_server_info);
NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx,
struct loadparm_context *lp_ctx,
struct auth_session_info **_session_info);
struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx);
#endif /* _SAMBA_AUTH_SESSION_H */

View File

@ -122,7 +122,7 @@ endef
define proto_header_template
$(1): $(2) ;
@echo "Creating $$@"
@$$(PERL) $$(srcdir)/script/mkproto.pl --srcdir=$$(srcdir) --builddir=$$(builddir) --all=$$@ $$^
@$$(PERL) $$(srcdir)/script/mkproto.pl --srcdir=$$(srcdir) --builddir=$$(builddir) --public=/dev/null --private=$$@ $$^
endef
# Shared module

View File

@ -1,7 +1,7 @@
########################
# ASN.1 Parse::Yapp parser
# Copyright (C) Stefan (metze) Metzmacher <metze@samba.org>
# released under the GNU GPL version 2 or later
# released under the GNU GPL version 3 or later

View File

@ -29,4 +29,6 @@ struct cldapd_server {
struct ldb_context *samctx;
};
struct ldap_SearchRequest;
#include "cldap_server/proto.h"

View File

@ -50,6 +50,7 @@
#include "lib/smbreadline/smbreadline.h"
#include "librpc/gen_ndr/ndr_nbt.h"
#include "param/param.h"
#include "librpc/rpc/dcerpc.h"
struct smbclient_context {
char *remote_cur_dir;

View File

@ -5,7 +5,7 @@
[BINARY::smbclient]
INSTALLDIR = BINDIR
PRIVATE_DEPENDENCIES = \
LIBSAMBA-CONFIG \
LIBSAMBA-HOSTCONFIG \
SMBREADLINE \
LIBSAMBA-UTIL \
LIBCLI_SMB \
@ -25,7 +25,7 @@ smbclient_OBJ_FILES = client/client.o
[BINARY::cifsdd]
INSTALLDIR = BINDIR
PRIVATE_DEPENDENCIES = \
LIBSAMBA-CONFIG \
LIBSAMBA-HOSTCONFIG \
LIBCLI_SMB \
LIBPOPT \
POPT_SAMBA \

View File

@ -26,14 +26,16 @@ m4_include(lib/popt/samba.m4)
m4_include(lib/charset/config.m4)
m4_include(lib/socket/config.m4)
m4_include(nsswitch/nsstest.m4)
m4_include(pidl/config.m4)
AC_CONFIG_FILES(lib/registry/registry.pc)
AC_CONFIG_FILES(librpc/dcerpc.pc)
AC_CONFIG_FILES(librpc/ndr.pc)
AC_CONFIG_FILES(torture/torture.pc)
AC_CONFIG_FILES(auth/gensec/gensec.pc)
AC_CONFIG_FILES(param/samba-config.pc)
AC_CONFIG_FILES(param/samba-hostconfig.pc)
AC_CONFIG_FILES(librpc/dcerpc_samr.pc)
AC_CONFIG_FILES(librpc/dcerpc_atsvc.pc)
SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.2.0,
[],

View File

@ -49,7 +49,7 @@ struct sidmap_context {
/*
open a sidmap context - use talloc_free to close
*/
_PUBLIC_ struct sidmap_context *sidmap_open(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx)
struct sidmap_context *sidmap_open(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx)
{
struct sidmap_context *sidmap;
sidmap = talloc(mem_ctx, struct sidmap_context);
@ -123,7 +123,7 @@ static NTSTATUS sidmap_primary_domain_sid(struct sidmap_context *sidmap,
/*
map a sid to a unix uid
*/
_PUBLIC_ NTSTATUS sidmap_sid_to_unixuid(struct sidmap_context *sidmap,
NTSTATUS sidmap_sid_to_unixuid(struct sidmap_context *sidmap,
const struct dom_sid *sid, uid_t *uid)
{
const char *attrs[] = { "sAMAccountName", "uidNumber",
@ -221,7 +221,7 @@ allocated_sid:
/*
see if a sid is a group - very inefficient!
*/
_PUBLIC_ bool sidmap_sid_is_group(struct sidmap_context *sidmap, struct dom_sid *sid)
bool sidmap_sid_is_group(struct sidmap_context *sidmap, struct dom_sid *sid)
{
const char *attrs[] = { "sAMAccountType", NULL };
int ret;
@ -262,7 +262,7 @@ _PUBLIC_ bool sidmap_sid_is_group(struct sidmap_context *sidmap, struct dom_sid
/*
map a sid to a unix gid
*/
_PUBLIC_ NTSTATUS sidmap_sid_to_unixgid(struct sidmap_context *sidmap,
NTSTATUS sidmap_sid_to_unixgid(struct sidmap_context *sidmap,
const struct dom_sid *sid, gid_t *gid)
{
const char *attrs[] = { "sAMAccountName", "gidNumber",
@ -355,7 +355,7 @@ allocated_sid:
map a unix uid to a dom_sid
the returned sid is allocated in the supplied mem_ctx
*/
_PUBLIC_ NTSTATUS sidmap_uid_to_sid(struct sidmap_context *sidmap,
NTSTATUS sidmap_uid_to_sid(struct sidmap_context *sidmap,
TALLOC_CTX *mem_ctx,
const uid_t uid, struct dom_sid **sid)
{
@ -453,7 +453,7 @@ allocate_sid:
map a unix gid to a dom_sid
the returned sid is allocated in the supplied mem_ctx
*/
_PUBLIC_ NTSTATUS sidmap_gid_to_sid(struct sidmap_context *sidmap,
NTSTATUS sidmap_gid_to_sid(struct sidmap_context *sidmap,
TALLOC_CTX *mem_ctx,
const gid_t gid, struct dom_sid **sid)
{
@ -550,7 +550,7 @@ allocate_sid:
check if a sid is in the range of auto-allocated SIDs from our primary domain,
and if it is, then return the name and atype
*/
_PUBLIC_ NTSTATUS sidmap_allocated_sid_lookup(struct sidmap_context *sidmap,
NTSTATUS sidmap_allocated_sid_lookup(struct sidmap_context *sidmap,
TALLOC_CTX *mem_ctx,
const struct dom_sid *sid,
const char **name,

View File

@ -28,6 +28,7 @@
#include "dsdb/samdb/samdb.h"
#include "libcli/security/security.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "librpc/gen_ndr/ndr_misc.h"
#include "dsdb/common/flags.h"
#include "dsdb/common/proto.h"
#include "libcli/ldap/ldap_ndr.h"
@ -1530,7 +1531,7 @@ static bool samdb_password_complexity_ok(const char *pass)
The caller should probably have a transaction wrapping this
*/
_PUBLIC_ NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
struct ldb_dn *user_dn,
struct ldb_dn *domain_dn,
struct ldb_message *mod,
@ -1770,7 +1771,7 @@ _PUBLIC_ NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ct
and actually performs the password change
*/
_PUBLIC_ NTSTATUS samdb_set_password_sid(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
NTSTATUS samdb_set_password_sid(struct ldb_context *ctx, TALLOC_CTX *mem_ctx,
const struct dom_sid *user_sid,
const char *new_pass,
struct samr_Password *lmNewHash,

View File

@ -18,7 +18,7 @@ SAMDB_OBJ_FILES = $(addprefix dsdb/, \
samdb/cracknames.o \
repl/replicated_objects.o)
PUBLIC_HEADERS += dsdb/samdb/samdb.h
# PUBLIC_HEADERS += dsdb/samdb/samdb.h
[SUBSYSTEM::SAMDB_COMMON]
PRIVATE_PROTO_HEADER = common/proto.h
@ -38,7 +38,7 @@ SAMDB_SCHEMA_OBJ_FILES = $(addprefix dsdb/schema/, \
schema_syntax.o \
schema_constructed.o)
PUBLIC_HEADERS += dsdb/schema/schema.h
# PUBLIC_HEADERS += dsdb/schema/schema.h
#######################
# Start SUBSYSTEM DREPL_SRV

View File

@ -520,6 +520,12 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, attrs);
ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
if (ret != LDB_SUCCESS) {
return ret;
}
/* Create a spot in the list for the requests */
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
@ -568,6 +574,12 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, attrs);
ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
if (ret != LDB_SUCCESS) {
return ret;
}
/* Create a spot in the list for the requests */
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
@ -629,7 +641,11 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, new_msg);
ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
if (ret != LDB_SUCCESS) {
return ret;
}
/* Now add it to the list */
ac->down_req = talloc_realloc(ac, ac->down_req,
@ -752,6 +768,12 @@ static int linked_attributes_rename(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, attrs);
ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
if (ret != LDB_SUCCESS) {
return ret;
}
ac->search_req = new_req;
ac->step = LA_SEARCH;
return ldb_next_request(module, new_req);
@ -805,6 +827,12 @@ static int linked_attributes_delete(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, attrs);
ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
if (ret != LDB_SUCCESS) {
return ret;
}
ac->search_req = new_req;
ac->step = LA_SEARCH;
return ldb_next_request(module, new_req);

View File

@ -6,7 +6,7 @@
Copyright (C) Stefan Metzmacher <metze@samba.org> 2007
* NOTICE: this module is NOT released under the GNU LGPL license as
* other ldb code. This module is release under the GNU GPL v2 or
* other ldb code. This module is release under the GNU GPL v3 or
* later license.
This program is free software; you can redistribute it and/or modify
@ -87,7 +87,7 @@ static struct ldb_module *make_module_for_next_request(TALLOC_CTX *mem_ctx,
struct ldb_module *module)
{
struct ldb_module *current;
_PUBLIC_ static const struct ldb_module_ops ops; /* zero */
static const struct ldb_module_ops ops; /* zero */
current = talloc_zero(mem_ctx, struct ldb_module);
if (current == NULL) {
return module;

View File

@ -5,7 +5,7 @@
Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
* NOTICE: this module is NOT released under the GNU LGPL license as
* other ldb code. This module is release under the GNU GPL v2 or
* other ldb code. This module is release under the GNU GPL v3 or
* later license.
This program is free software; you can redistribute it and/or modify

View File

@ -25,8 +25,6 @@
* Description: add schema check functionality
*
* Author: Simo Sorce
*
* License: GNU GPL v2 or Later
*/
#include "includes.h"

View File

@ -25,8 +25,6 @@
* Description: add schema syntax functionality
*
* Author: Simo Sorce
*
* License: GNU GPL v2 or Later
*/
#include "includes.h"

View File

@ -25,8 +25,6 @@
* Description: add schema syntax functionality
*
* Author: Simo Sorce
*
* License: GNU GPL v2 or Later
*/

View File

@ -160,6 +160,12 @@ static int subtree_delete(struct ldb_module *module, struct ldb_request *req)
return ret;
}
ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
if (ret != LDB_SUCCESS) {
return ret;
}
ac->search_req = new_req;
if (req == NULL) {
ldb_oom(ac->module->ldb);

View File

@ -117,7 +117,15 @@ static int subtree_rename_search_callback(struct ldb_context *ldb, void *context
NULL,
NULL);
if (ret != LDB_SUCCESS) return ret;
if (ret != LDB_SUCCESS) {
return ret;
}
ret = ldb_set_timeout_from_prev_req(ldb, ac->orig_req, req);
if (ret != LDB_SUCCESS) {
return ret;
}
talloc_steal(req, newdn);
@ -186,6 +194,12 @@ static int subtree_rename(struct ldb_module *module, struct ldb_request *req)
return ret;
}
ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
if (ret != LDB_SUCCESS) {
return ret;
}
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
if (!ac->down_req) {

View File

@ -73,7 +73,7 @@ static NTSTATUS samdb_privilege_setup_sid(void *samctx, TALLOC_CTX *mem_ctx,
setup the privilege mask for this security token based on our
local SAM
*/
_PUBLIC_ NTSTATUS samdb_privilege_setup(struct loadparm_context *lp_ctx, struct security_token *token)
NTSTATUS samdb_privilege_setup(struct loadparm_context *lp_ctx, struct security_token *token)
{
void *samctx;
TALLOC_CTX *mem_ctx;

View File

@ -1,6 +1,5 @@
# FIXME: This file should be autogenerated by the build system at some
# point
lib/talloc/talloc.h: talloc.h
lib/util/util.h: util.h
lib/util/debug.h: util/debug.h
lib/util/mutex.h: util/mutex.h
@ -10,114 +9,65 @@ lib/util/safe_string.h: util/safe_string.h
lib/util/xfile.h: util/xfile.h
lib/tdr/tdr.h: tdr.h
librpc/rpc/dcerpc.h: dcerpc.h
lib/socket_wrapper/socket_wrapper.h: socket_wrapper.h
lib/nss_wrapper/nss_wrapper.h: nss_wrapper.h
libnet/libnet.h: libnet.h
libnet/libnet_join.h: libnet/join.h
libnet/libnet_lookup.h: libnet/lookup.h
libnet/libnet_passwd.h: libnet/passwd.h
libnet/libnet_rpc.h: libnet/rpc.h
libnet/libnet_share.h: libnet/share.h
libnet/libnet_time.h: libnet/time.h
libnet/libnet_user.h: libnet/user.h
libnet/libnet_site.h: libnet/site.h
libnet/libnet_vampire.h: libnet/vampire.h
libnet/userinfo.h: libnet/userinfo.h
libnet/userman.h: libnet/userman.h
lib/ldb/include/ldb.h: ldb.h
lib/ldb/include/ldb_errors.h: ldb_errors.h
ntvfs/ntvfs.h: ntvfs.h
lib/tdb/include/tdb.h: tdb.h
auth/gensec/gensec.h: gensec.h
gtk/common/gtk-smb.h: gtk-smb.h
gtk/common/select.h: gtk/select.h
librpc/ndr/libndr.h: ndr.h
lib/registry/registry.h: registry/registry.h
lib/registry/hive.h: registry/hive.h
lib/registry/patchfile.h: registry/patchfile.h
lib/registry/registry.h: registry.h
libcli/util/werror.h: core/werror.h
libcli/util/doserr.h: core/doserr.h
libcli/util/ntstatus.h: core/ntstatus.h
libcli/cldap/cldap.h: cldap.h
lib/samba3/samba3.h: samba3.h
librpc/gen_ndr/dcerpc.h: gen_ndr/dcerpc.h
librpc/gen_ndr/netlogon.h: gen_ndr/netlogon.h
librpc/gen_ndr/ndr_misc.h: gen_ndr/ndr_misc.h
librpc/gen_ndr/ndr_dcerpc.h: gen_ndr/ndr_dcerpc.h
librpc/gen_ndr/mgmt.h: dcerpc/mgmt.h
librpc/gen_ndr/ndr_mgmt.h: dcerpc/ndr_mgmt.h
librpc/gen_ndr/ndr_mgmt_c.h: dcerpc/ndr_mgmt_c.h
librpc/gen_ndr/epmapper.h: dcerpc/epmapper.h
librpc/gen_ndr/ndr_epmapper.h: dcerpc/ndr_epmapper.h
librpc/gen_ndr/ndr_epmapper_c.h: dcerpc/ndr_epmapper_c.h
librpc/gen_ndr/ndr_atsvc.h: dcerpc/ndr_atsvc.h
librpc/gen_ndr/atsvc.h: dcerpc/atsvc.h
librpc/gen_ndr/ndr_atsvc_c.h: dcerpc/ndr_atsvc_c.h
librpc/gen_ndr/mgmt.h: gen_ndr/mgmt.h
librpc/gen_ndr/ndr_mgmt.h: gen_ndr/ndr_mgmt.h
librpc/gen_ndr/ndr_mgmt_c.h: gen_ndr/ndr_mgmt_c.h
librpc/gen_ndr/epmapper.h: gen_ndr/epmapper.h
librpc/gen_ndr/ndr_epmapper.h: gen_ndr/ndr_epmapper.h
librpc/gen_ndr/ndr_epmapper_c.h: gen_ndr/ndr_epmapper_c.h
librpc/gen_ndr/ndr_atsvc.h: gen_ndr/ndr_atsvc.h
librpc/gen_ndr/atsvc.h: gen_ndr/atsvc.h
librpc/gen_ndr/ndr_atsvc_c.h: gen_ndr/ndr_atsvc_c.h
librpc/gen_ndr/misc.h: gen_ndr/misc.h
librpc/gen_ndr/lsa.h: gen_ndr/lsa.h
librpc/gen_ndr/samr.h: dcerpc/samr.h
librpc/gen_ndr/ndr_samr.h: dcerpc/ndr_samr.h
librpc/gen_ndr/ndr_samr_c.h: dcerpc/ndr_samr_c.h
librpc/gen_ndr/samr.h: gen_ndr/samr.h
librpc/gen_ndr/ndr_samr.h: gen_ndr/ndr_samr.h
librpc/gen_ndr/ndr_samr_c.h: gen_ndr/ndr_samr_c.h
librpc/gen_ndr/security.h: gen_ndr/security.h
librpc/ndr/libndr_proto.h: ndr/proto.h
librpc/rpc/dcerpc_proto.h: dcerpc/proto.h
lib/tdr/tdr_proto.h: tdr/proto.h
auth/credentials/credentials.h: credentials.h
auth/credentials/credentials_proto.h: credentials/proto.h
auth/credentials/credentials_krb5.h: credentials/krb5.h
auth/credentials/credentials_krb5_proto.h: credentials/krb5_proto.h
rpc_server/dcerpc_server.h: dcerpc_server.h
rpc_server/common/common.h: dcerpc_server/common.h
rpc_server/common/proto.h: dcerpc_server/common_proto.h
rpc_server/dcerpc_server_proto.h: dcerpc_server/proto.h
auth/auth.h: auth.h
auth/auth_proto.h: auth/proto.h
auth/system_session_proto.h: auth/system_session.h
auth/session_proto.h: auth/session_proto.h
auth/session.h: auth/session.h
auth/gensec/spnego.h: gensec/spnego.h
auth/gensec/gensec_proto.h: gensec/proto.h
libcli/auth/credentials.h: domain_credentials.h
lib/charset/charset.h: charset.h
lib/charset/charset_proto.h: charset/proto.h
libcli/ldap/ldap.h: ldap.h
libcli/ldap/ldap_proto.h: ldap_proto.h
torture/torture.h: torture.h
torture/proto.h: torture/proto.h
torture/util.h: torture/util.h
libcli/libcli.h: client.h
libcli/libcli_proto.h: client/proto.h
librpc/gen_ndr/nbt.h: gen_ndr/nbt.h
librpc/gen_ndr/svcctl.h: dcerpc/svcctl.h
librpc/gen_ndr/ndr_svcctl.h: dcerpc/ndr_svcctl.h
librpc/gen_ndr/ndr_svcctl_c.h: dcerpc/ndr_svcctl_c.h
librpc/gen_ndr/svcctl.h: gen_ndr/svcctl.h
librpc/gen_ndr/ndr_svcctl.h: gen_ndr/ndr_svcctl.h
librpc/gen_ndr/ndr_svcctl_c.h: gen_ndr/ndr_svcctl_c.h
lib/cmdline/popt_common.h: samba/popt.h
lib/util/dlinklist.h: dlinklist.h
lib/util/data_blob.h: util/data_blob.h
lib/util/time.h: util/time.h
version.h: samba/version.h
param/proto.h: param/proto.h
param/param.h: param.h
dsdb/samdb/samdb.h: samdb.h
dsdb/samdb/samdb_proto.h: samdb/proto.h
dsdb/schema/schema.h: samdb/schema.h
dsdb/schema/proto.h: samdb/schema_proto.h
dsdb/common/proto.h: samdb/common_proto.h
lib/util/asn1.h: samba/asn1.h
lib/util/asn1_proto.h: samba/asn1/proto.h
libcli/util/error.h: core/error.h
libcli/util/proto.h: core/error_proto.h
lib/tdb_wrap.h: tdb_wrap.h
lib/ldb_wrap.h: ldb_wrap.h
torture/ui.h: torture/ui.h
torture/torture.h: torture/torture.h
librpc/gen_ndr/winbind.h: winbind.h
param/share.h: param/share.h
param/share_proto.h: param/share_proto.h
librpc/gen_ndr/winbind.h: gen_ndr/winbind.h
param/share.h: share.h
lib/util/util_tdb.h: util_tdb.h
lib/util/util_ldb.h: util_ldb.h
lib/util/wrap_xattr.h: wrap_xattr.h
lib/events/events.h: events/events.h
lib/events/events_internal.h: events/events_internal.h
libcli/ldap/ldap_ndr.h: ldb/ldap_ndr.h
lib/gencache/gencache.h: gencache.h
libcli/ldap/ldap_ndr.h: ldap_ndr.h
lib/events/events.h: events.h
lib/events/events_internal.h: events_internal.h

View File

@ -466,7 +466,7 @@ HEIMDAL_ROKEN_OBJ_FILES = \
# Start SUBSYSTEM HEIMDAL_GLUE
[SUBSYSTEM::HEIMDAL_GLUE]
CFLAGS = -Iheimdal_build -Iheimdal/lib/krb5 -Iheimdal/lib/asn1 -Iheimdal/lib/com_err
PUBLIC_DEPENDENCIES = LIBNETIF LIBSAMBA-CONFIG
PUBLIC_DEPENDENCIES = LIBNETIF LIBSAMBA-HOSTCONFIG
# End SUBSYSTEM HEIMDAL_GLUE
#######################

View File

@ -10,7 +10,7 @@ PRIVATE_DEPENDENCIES = CREDENTIALS \
LIBCLI_LDAP SAMDB \
process_model \
gensec \
LIBSAMBA-CONFIG
LIBSAMBA-HOSTCONFIG
# End SUBSYSTEM SMB
#######################

View File

@ -216,9 +216,6 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
lreq = talloc(local_ctx, struct ldb_request);
NT_STATUS_HAVE_NO_MEMORY(lreq);
res = talloc_zero(local_ctx, struct ldb_result);
NT_STATUS_HAVE_NO_MEMORY(res);
lreq->operation = LDB_SEARCH;
lreq->op.search.base = basedn;
lreq->op.search.scope = scope;
@ -242,6 +239,9 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
}
}
res = talloc_zero(lreq, struct ldb_result);
NT_STATUS_HAVE_NO_MEMORY(res);
lreq->context = res;
lreq->callback = ldb_search_default_callback;
@ -261,6 +261,11 @@ static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call)
ent_r = ldapsrv_init_reply(call, LDAP_TAG_SearchResultEntry);
NT_STATUS_HAVE_NO_MEMORY(ent_r);
/* Better to have the whole message kept here,
* than to find someone further up didn't put
* a value in the right spot in the talloc tree */
talloc_steal(ent_r, res->msgs[i]);
ent = &ent_r->msg->r.SearchResultEntry;
ent->dn = ldb_dn_alloc_linearized(ent_r, res->msgs[i]->dn);
ent->num_attributes = 0;

View File

@ -37,6 +37,8 @@
#include "lib/messaging/irpc.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "libcli/ldap/ldap.h"
#include "libcli/ldap/ldap_proto.h"
#include "system/network.h"
#include "lib/socket/netif.h"
#include "dsdb/samdb/samdb.h"
@ -155,8 +157,10 @@ static NTSTATUS ldapsrv_decode(void *private, DATA_BLOB blob)
}
data_blob_free(&blob);
ldapsrv_process_message(conn, msg);
talloc_steal(conn, msg);
asn1_free(asn1);
ldapsrv_process_message(conn, msg);
return NT_STATUS_OK;
}

View File

@ -27,7 +27,7 @@ PRIVATE_DEPENDENCIES = TDB_WRAP
GENCACHE_OBJ_FILES = gencache/gencache.o
PUBLIC_HEADERS += lib/gencache/gencache.h
# PUBLIC_HEADERS += lib/gencache/gencache.h
[SUBSYSTEM::LDB_WRAP]
PUBLIC_DEPENDENCIES = LIBLDB

View File

@ -83,7 +83,7 @@ static int close_iconv(struct smb_iconv_convenience *data)
return 0;
}
struct smb_iconv_convenience *smb_iconv_convenience_init(TALLOC_CTX *mem_ctx,
_PUBLIC_ struct smb_iconv_convenience *smb_iconv_convenience_init(TALLOC_CTX *mem_ctx,
const char *dos_charset,
const char *unix_charset,
bool native_iconv)

View File

@ -18,6 +18,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* This is a public header file that is installed as part of Samba.
* If you remove any functions or change their signature, update
* the so version number. */
#ifndef __CHARSET_H__
#define __CHARSET_H__
@ -74,11 +78,71 @@ struct loadparm_context;
struct smb_iconv_convenience;
extern struct smb_iconv_convenience *global_smb_iconv_convenience;
#include "lib/charset/charset_proto.h"
/* replace some string functions with multi-byte
versions */
#define strlower(s) strlower_m(s)
#define strupper(s) strupper_m(s)
char *strchr_m(const char *s, char c);
size_t strlen_m_term(const char *s);
size_t strlen_m(const char *s);
char *alpha_strcpy(char *dest, const char *src, const char *other_safe_chars, size_t maxlength);
void string_replace_w(char *s, char oldc, char newc);
bool strcsequal_w(const char *s1,const char *s2);
bool strequal_w(const char *s1, const char *s2);
int strncasecmp_m(const char *s1, const char *s2, size_t n);
bool next_token(const char **ptr,char *buff, const char *sep, size_t bufsize);
int strcasecmp_m(const char *s1, const char *s2);
size_t count_chars_w(const char *s, char c);
void strupper_m(char *s);
void strlower_m(char *s);
char *strupper_talloc(TALLOC_CTX *ctx, const char *src);
char *strlower_talloc(TALLOC_CTX *ctx, const char *src);
bool strhasupper(const char *string);
bool strhaslower(const char *string);
char *strrchr_m(const char *s, char c);
char *strchr_m(const char *s, char c);
/* codepoints */
codepoint_t next_codepoint(struct smb_iconv_convenience *ic,
const char *str, size_t *size);
ssize_t push_codepoint(struct smb_iconv_convenience *ic,
char *str, codepoint_t c);
codepoint_t toupper_w(codepoint_t val);
codepoint_t tolower_w(codepoint_t val);
int codepoint_cmpi(codepoint_t c1, codepoint_t c2);
ssize_t push_string(struct smb_iconv_convenience *ic, void *dest, const char *src, size_t dest_len, int flags);
ssize_t pull_string(struct smb_iconv_convenience *ic,
char *dest, const void *src, size_t dest_len, size_t src_len, int flags);
ssize_t convert_string(struct smb_iconv_convenience *ic,
charset_t from, charset_t to,
void const *src, size_t srclen,
void *dest, size_t destlen);
ssize_t convert_string_talloc_descriptor(TALLOC_CTX *ctx, smb_iconv_t descriptor, void const *src, size_t srclen, void **dest);
ssize_t convert_string_talloc(TALLOC_CTX *ctx,
struct smb_iconv_convenience *ic,
charset_t from, charset_t to,
void const *src, size_t srclen,
void **dest);
ssize_t push_ascii_talloc(TALLOC_CTX *ctx, struct smb_iconv_convenience *ic, char **dest, const char *src);
ssize_t push_ucs2_talloc(TALLOC_CTX *ctx, struct smb_iconv_convenience *ic, void **dest, const char *src);
ssize_t push_utf8_talloc(TALLOC_CTX *ctx, struct smb_iconv_convenience *ic, char **dest, const char *src);
ssize_t pull_ascii_talloc(TALLOC_CTX *ctx, struct smb_iconv_convenience *ic, char **dest, const char *src);
ssize_t pull_ucs2_talloc(TALLOC_CTX *ctx, struct smb_iconv_convenience *ic, char **dest, const void *src);
ssize_t pull_utf8_talloc(TALLOC_CTX *ctx, struct smb_iconv_convenience *ic, char **dest, const char *src);
/* iconv */
smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode);
int smb_iconv_close(smb_iconv_t cd);
size_t smb_iconv(smb_iconv_t cd,
const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft);
smb_iconv_t smb_iconv_open_ex(TALLOC_CTX *mem_ctx, const char *tocode,
const char *fromcode, bool native_iconv);
/* iconv convenience */
struct smb_iconv_convenience *smb_iconv_convenience_init(TALLOC_CTX *mem_ctx,
const char *dos_charset,
const char *unix_charset,
bool native_iconv);
#endif /* __CHARSET_H__ */

View File

@ -113,7 +113,7 @@ static size_t sys_iconv(void *cd,
* It only knows about a very small number of character sets - just
* enough that Samba works on systems that don't have iconv.
**/
size_t smb_iconv(smb_iconv_t cd,
_PUBLIC_ size_t smb_iconv(smb_iconv_t cd,
const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
@ -156,7 +156,7 @@ static bool is_utf16(const char *name)
smb_iconv_t smb_iconv_open_ex(TALLOC_CTX *mem_ctx, const char *tocode,
_PUBLIC_ smb_iconv_t smb_iconv_open_ex(TALLOC_CTX *mem_ctx, const char *tocode,
const char *fromcode, bool native_iconv)
{
smb_iconv_t ret;
@ -263,7 +263,7 @@ failed:
/*
simple iconv_open() wrapper
*/
smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode)
_PUBLIC_ smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode)
{
return smb_iconv_open_ex(NULL, tocode, fromcode, true);
}
@ -271,7 +271,7 @@ smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode)
/*
simple iconv_close() wrapper
*/
int smb_iconv_close(smb_iconv_t cd)
_PUBLIC_ int smb_iconv_close(smb_iconv_t cd)
{
#ifdef HAVE_NATIVE_ICONV
if (cd->cd_direct) iconv_close((iconv_t)cd->cd_direct);

View File

@ -67,7 +67,7 @@ static void load_case_tables(void)
/**
Convert a codepoint_t to upper case.
**/
codepoint_t toupper_w(codepoint_t val)
_PUBLIC_ codepoint_t toupper_w(codepoint_t val)
{
if (val < 128) {
return toupper(val);
@ -87,7 +87,7 @@ codepoint_t toupper_w(codepoint_t val)
/**
Convert a codepoint_t to lower case.
**/
codepoint_t tolower_w(codepoint_t val)
_PUBLIC_ codepoint_t tolower_w(codepoint_t val)
{
if (val < 128) {
return tolower(val);
@ -107,7 +107,7 @@ codepoint_t tolower_w(codepoint_t val)
/**
compare two codepoints case insensitively
*/
int codepoint_cmpi(codepoint_t c1, codepoint_t c2)
_PUBLIC_ int codepoint_cmpi(codepoint_t c1, codepoint_t c2)
{
if (c1 == c2 ||
toupper_w(c1) == toupper_w(c2)) {

View File

@ -33,8 +33,10 @@ EVENTS_STANDARD_OBJ_FILES = lib/events/events_standard.o
##############################
# Start SUBSYSTEM LIBEVENTS
[SUBSYSTEM::LIBEVENTS]
[LIBRARY::LIBEVENTS]
PUBLIC_DEPENDENCIES = LIBTALLOC LIBSAMBA-UTIL
SO_VERSION = 0
VERSION = 0.0.1
# End SUBSYSTEM LIBEVENTS
##############################

View File

@ -25,7 +25,6 @@ parser.add_option_group(options.VersionOptions(parser))
# use command line creds if available
credopts = options.CredentialsOptions(parser)
parser.add_option_group(credopts)
creds = credopts.get_credentials()
opts, args = parser.parse_args()
if len(args) < 1:
@ -35,6 +34,7 @@ if len(args) < 1:
host = args[0]
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
class BasicTests(unittest.TestCase):
def delete_force(self, ldb, dn):

View File

@ -19,6 +19,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IRPC_H
#define IRPC_H
#include "librpc/gen_ndr/irpc.h"
/*
@ -123,4 +126,5 @@ struct server_id *irpc_servers_byname(struct messaging_context *msg_ctx, TALLOC_
void irpc_remove_name(struct messaging_context *msg_ctx, const char *name);
NTSTATUS irpc_send_reply(struct irpc_message *m, NTSTATUS status);
#endif

View File

@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,

View File

@ -1,6 +1,6 @@
[SUBSYSTEM::LIBPOLICY]
CFLAGS = -Iheimdal/lib/roken
PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL LIBSAMBA-CONFIG LIBTALLOC CHARSET
PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL LIBSAMBA-HOSTCONFIG LIBTALLOC CHARSET
LIBPOLICY_OBJ_FILES = lib/policy/lex.o lib/policy/parse_adm.o
@ -9,6 +9,6 @@ lib/policy/lex.l: lib/policy/parse_adm.h
lib/policy/parse_adm.h: lib/policy/parse_adm.c
[BINARY::dumpadm]
PRIVATE_DEPENDENCIES = LIBPOLICY LIBPOPT LIBSAMBA-CONFIG LIBTALLOC LIBSAMBA-UTIL CHARSET
PRIVATE_DEPENDENCIES = LIBPOLICY LIBPOPT LIBSAMBA-HOSTCONFIG LIBTALLOC LIBSAMBA-UTIL CHARSET
dumpadm_OBJ_FILES = lib/policy/dumpadm.o

View File

@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,

View File

@ -572,7 +572,7 @@ char *yytext;
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,

View File

@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,

View File

@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,

View File

@ -33,7 +33,7 @@ registry_OBJ_FILES = $(addprefix lib/registry/, interface.o util.o samba.o \
patchfile_dotreg.o patchfile_preg.o patchfile.o regf.o \
hive.o local.o ldb.o dir.o rpc.o)
PUBLIC_HEADERS += $(addprefix lib/registry/, registry.h hive.h patchfile.h)
PUBLIC_HEADERS += lib/registry/registry.h
[SUBSYSTEM::registry_common]
PUBLIC_DEPENDENCIES = registry
@ -46,7 +46,7 @@ registry_common_OBJ_FILES = lib/registry/tools/common.o
[BINARY::regdiff]
INSTALLDIR = BINDIR
PRIVATE_DEPENDENCIES = \
LIBSAMBA-CONFIG registry LIBPOPT POPT_SAMBA POPT_CREDENTIALS
LIBSAMBA-HOSTCONFIG registry LIBPOPT POPT_SAMBA POPT_CREDENTIALS
# End BINARY regdiff
################################################
@ -59,7 +59,7 @@ MANPAGES += lib/registry/man/regdiff.1
[BINARY::regpatch]
INSTALLDIR = BINDIR
PRIVATE_DEPENDENCIES = \
LIBSAMBA-CONFIG registry LIBPOPT POPT_SAMBA POPT_CREDENTIALS \
LIBSAMBA-HOSTCONFIG registry LIBPOPT POPT_SAMBA POPT_CREDENTIALS \
registry_common
# End BINARY regpatch
################################################
@ -73,7 +73,7 @@ MANPAGES += lib/registry/man/regpatch.1
[BINARY::regshell]
INSTALLDIR = BINDIR
PRIVATE_DEPENDENCIES = \
LIBSAMBA-CONFIG LIBPOPT registry POPT_SAMBA POPT_CREDENTIALS \
LIBSAMBA-HOSTCONFIG LIBPOPT registry POPT_SAMBA POPT_CREDENTIALS \
SMBREADLINE registry_common
# End BINARY regshell
################################################
@ -87,7 +87,7 @@ MANPAGES += lib/registry/man/regshell.1
[BINARY::regtree]
INSTALLDIR = BINDIR
PRIVATE_DEPENDENCIES = \
LIBSAMBA-CONFIG LIBPOPT registry POPT_SAMBA POPT_CREDENTIALS \
LIBSAMBA-HOSTCONFIG LIBPOPT registry POPT_SAMBA POPT_CREDENTIALS \
registry_common
# End BINARY regtree
################################################

View File

@ -18,7 +18,7 @@
*/
#include "includes.h"
#include "hive.h"
#include "registry.h"
#include "system/dir.h"
#include "system/filesys.h"

View File

@ -6,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@ -20,7 +20,7 @@
*/
#include "includes.h"
#include "hive.h"
#include "registry.h"
#include "system/filesys.h"
#include "param/param.h"

View File

@ -1,209 +0,0 @@
/*
Unix SMB/CIFS implementation.
Registry hive interface
Copyright (C) Jelmer Vernooij 2003-2007.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __REGISTRY_HIVE_H__
#define __REGISTRY_HIVE_H__
#include <talloc.h>
#include "libcli/util/werror.h"
#include "librpc/gen_ndr/security.h"
#include "libcli/util/ntstatus.h"
/**
* This file contains the hive API. This API is generally used for
* reading a specific file that contains just one hive.
*
* Good examples are .DAT (NTUSER.DAT) files.
*
* This API does not have any notification support (that
* should be provided by the registry implementation), nor
* does it understand what predefined keys are.
*/
struct hive_key {
const struct hive_operations *ops;
};
struct hive_operations {
const char *name;
/**
* Open a specific subkey
*/
WERROR (*enum_key) (TALLOC_CTX *mem_ctx,
const struct hive_key *key, uint32_t idx,
const char **name,
const char **classname,
NTTIME *last_mod_time);
/**
* Open a subkey by name
*/
WERROR (*get_key_by_name) (TALLOC_CTX *mem_ctx,
const struct hive_key *key, const char *name,
struct hive_key **subkey);
/**
* Add a new key.
*/
WERROR (*add_key) (TALLOC_CTX *ctx,
const struct hive_key *parent_key, const char *name,
const char *classname,
struct security_descriptor *desc,
struct hive_key **key);
/**
* Remove an existing key.
*/
WERROR (*del_key) (const struct hive_key *key, const char *name);
/**
* Force write of a key to disk.
*/
WERROR (*flush_key) (struct hive_key *key);
/**
* Retrieve a registry value with a specific index.
*/
WERROR (*enum_value) (TALLOC_CTX *mem_ctx,
struct hive_key *key, int idx,
const char **name, uint32_t *type,
DATA_BLOB *data);
/**
* Retrieve a registry value with the specified name
*/
WERROR (*get_value_by_name) (TALLOC_CTX *mem_ctx,
struct hive_key *key, const char *name,
uint32_t *type, DATA_BLOB *data);
/**
* Set a value on the specified registry key.
*/
WERROR (*set_value) (struct hive_key *key, const char *name,
uint32_t type, const DATA_BLOB data);
/**
* Remove a value.
*/
WERROR (*delete_value) (struct hive_key *key, const char *name);
/* Security Descriptors */
/**
* Change the security descriptor on a registry key.
*
* This should return WERR_NOT_SUPPORTED if the underlying
* format does not have a mechanism for storing
* security descriptors.
*/
WERROR (*set_sec_desc) (struct hive_key *key,
const struct security_descriptor *desc);
/**
* Retrieve the security descriptor on a registry key.
*
* This should return WERR_NOT_SUPPORTED if the underlying
* format does not have a mechanism for storing
* security descriptors.
*/
WERROR (*get_sec_desc) (TALLOC_CTX *ctx,
const struct hive_key *key,
struct security_descriptor **desc);
/**
* Retrieve general information about a key.
*/
WERROR (*get_key_info) (TALLOC_CTX *mem_ctx,
const struct hive_key *key,
const char **classname,
uint32_t *num_subkeys,
uint32_t *num_values,
NTTIME *last_change_time,
uint32_t *max_subkeynamelen,
uint32_t *max_valnamelen,
uint32_t *max_valbufsize);
};
struct cli_credentials;
struct auth_session_info;
WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *location,
struct auth_session_info *session_info,
struct cli_credentials *credentials,
struct loadparm_context *lp_ctx,
struct hive_key **root);
WERROR hive_key_get_info(TALLOC_CTX *mem_ctx, const struct hive_key *key,
const char **classname, uint32_t *num_subkeys,
uint32_t *num_values, NTTIME *last_change_time,
uint32_t *max_subkeynamelen,
uint32_t *max_valnamelen, uint32_t *max_valbufsize);
WERROR hive_key_add_name(TALLOC_CTX *ctx, const struct hive_key *parent_key,
const char *name, const char *classname,
struct security_descriptor *desc,
struct hive_key **key);
WERROR hive_key_del(const struct hive_key *key, const char *name);
WERROR hive_get_key_by_name(TALLOC_CTX *mem_ctx,
const struct hive_key *key, const char *name,
struct hive_key **subkey);
WERROR hive_enum_key(TALLOC_CTX *mem_ctx,
const struct hive_key *key, uint32_t idx,
const char **name,
const char **classname,
NTTIME *last_mod_time);
WERROR hive_key_set_value(struct hive_key *key, const char *name,
uint32_t type, const DATA_BLOB data);
WERROR hive_get_value(TALLOC_CTX *mem_ctx,
struct hive_key *key, const char *name,
uint32_t *type, DATA_BLOB *data);
WERROR hive_get_value_by_index(TALLOC_CTX *mem_ctx,
struct hive_key *key, uint32_t idx,
const char **name,
uint32_t *type, DATA_BLOB *data);
WERROR hive_key_del_value(struct hive_key *key, const char *name);
WERROR hive_key_flush(struct hive_key *key);
/* Individual backends */
WERROR reg_open_directory(TALLOC_CTX *parent_ctx,
const char *location, struct hive_key **key);
WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx,
const char *location, struct smb_iconv_convenience *iconv_convenience,
struct hive_key **key);
WERROR reg_open_ldb_file(TALLOC_CTX *parent_ctx, const char *location,
struct auth_session_info *session_info,
struct cli_credentials *credentials,
struct loadparm_context *lp_ctx,
struct hive_key **k);
WERROR reg_create_directory(TALLOC_CTX *parent_ctx,
const char *location, struct hive_key **key);
WERROR reg_create_regf_file(TALLOC_CTX *parent_ctx,
struct smb_iconv_convenience *iconv_convenience,
const char *location,
int major_version,
struct hive_key **key);
#endif /* __REGISTRY_HIVE_H__ */

View File

@ -5,7 +5,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,

View File

@ -20,7 +20,6 @@
*/
#include "includes.h"
#include "lib/registry/patchfile.h"
#include "lib/registry/registry.h"
#include "system/filesys.h"
#include "param/param.h"

View File

@ -1,55 +0,0 @@
/*
Unix SMB/CIFS implementation.
Patchfile interface
Copyright (C) Jelmer Vernooij 2006
Copyright (C) Wilco Baan Hofman 2006
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _PATCHFILE_H
#define _PATCHFILE_H
#include "lib/registry/registry.h"
struct reg_diff_callbacks {
WERROR (*add_key) (void *callback_data, const char *key_name);
WERROR (*set_value) (void *callback_data, const char *key_name,
const char *value_name, uint32_t value_type,
DATA_BLOB value);
WERROR (*del_value) (void *callback_data, const char *key_name,
const char *value_name);
WERROR (*del_key) (void *callback_data, const char *key_name);
WERROR (*del_all_values) (void *callback_data, const char *key_name);
WERROR (*done) (void *callback_data);
};
WERROR reg_diff_apply(struct registry_context *ctx, const char *filename);
WERROR reg_generate_diff(struct registry_context *ctx1,
struct registry_context *ctx2,
const struct reg_diff_callbacks *callbacks,
void *callback_data);
WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename,
struct smb_iconv_convenience *iconv_convenience,
struct reg_diff_callbacks **callbacks,
void **callback_data);
WERROR reg_generate_diff_key(struct registry_key *oldkey,
struct registry_key *newkey,
const char *path,
const struct reg_diff_callbacks *callbacks,
void *callback_data);
#endif /* _PATCHFILE_H */

View File

@ -7,7 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@ -23,7 +23,6 @@
/* FIXME Newer .REG files, created by Windows XP and above use unicode UTF-16 */
#include "includes.h"
#include "lib/registry/patchfile.h"
#include "lib/registry/registry.h"
#include "system/filesys.h"
#include "param/param.h"

View File

@ -6,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@ -21,7 +21,6 @@
#include "includes.h"
#include "lib/registry/registry.h"
#include "lib/registry/patchfile.h"
#include "system/filesys.h"
#include "param/param.h"

View File

@ -18,13 +18,13 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "includes.h"
#include "lib/registry/hive.h"
#include "system/filesys.h"
#include "system/time.h"
#include "lib/registry/tdr_regf.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "librpc/gen_ndr/winreg.h"
#include "param/param.h"
#include "lib/registry/registry.h"
static struct hive_operations reg_backend_regf;

View File

@ -22,11 +22,196 @@
#define _REGISTRY_H
struct registry_context;
struct loadparm_context;
struct smb_iconv_convenience;
#include <talloc.h>
#include "libcli/util/werror.h"
#include "librpc/gen_ndr/security.h"
#include "lib/registry/hive.h"
#include "libcli/util/ntstatus.h"
#include "util/time.h"
#include "util/data_blob.h"
/**
* The hive API. This API is generally used for
* reading a specific file that contains just one hive.
*
* Good examples are .DAT (NTUSER.DAT) files.
*
* This API does not have any notification support (that
* should be provided by the registry implementation), nor
* does it understand what predefined keys are.
*/
struct hive_key {
const struct hive_operations *ops;
};
struct hive_operations {
const char *name;
/**
* Open a specific subkey
*/
WERROR (*enum_key) (TALLOC_CTX *mem_ctx,
const struct hive_key *key, uint32_t idx,
const char **name,
const char **classname,
NTTIME *last_mod_time);
/**
* Open a subkey by name
*/
WERROR (*get_key_by_name) (TALLOC_CTX *mem_ctx,
const struct hive_key *key, const char *name,
struct hive_key **subkey);
/**
* Add a new key.
*/
WERROR (*add_key) (TALLOC_CTX *ctx,
const struct hive_key *parent_key, const char *name,
const char *classname,
struct security_descriptor *desc,
struct hive_key **key);
/**
* Remove an existing key.
*/
WERROR (*del_key) (const struct hive_key *key, const char *name);
/**
* Force write of a key to disk.
*/
WERROR (*flush_key) (struct hive_key *key);
/**
* Retrieve a registry value with a specific index.
*/
WERROR (*enum_value) (TALLOC_CTX *mem_ctx,
struct hive_key *key, int idx,
const char **name, uint32_t *type,
DATA_BLOB *data);
/**
* Retrieve a registry value with the specified name
*/
WERROR (*get_value_by_name) (TALLOC_CTX *mem_ctx,
struct hive_key *key, const char *name,
uint32_t *type, DATA_BLOB *data);
/**
* Set a value on the specified registry key.
*/
WERROR (*set_value) (struct hive_key *key, const char *name,
uint32_t type, const DATA_BLOB data);
/**
* Remove a value.
*/
WERROR (*delete_value) (struct hive_key *key, const char *name);
/* Security Descriptors */
/**
* Change the security descriptor on a registry key.
*
* This should return WERR_NOT_SUPPORTED if the underlying
* format does not have a mechanism for storing
* security descriptors.
*/
WERROR (*set_sec_desc) (struct hive_key *key,
const struct security_descriptor *desc);
/**
* Retrieve the security descriptor on a registry key.
*
* This should return WERR_NOT_SUPPORTED if the underlying
* format does not have a mechanism for storing
* security descriptors.
*/
WERROR (*get_sec_desc) (TALLOC_CTX *ctx,
const struct hive_key *key,
struct security_descriptor **desc);
/**
* Retrieve general information about a key.
*/
WERROR (*get_key_info) (TALLOC_CTX *mem_ctx,
const struct hive_key *key,
const char **classname,
uint32_t *num_subkeys,
uint32_t *num_values,
NTTIME *last_change_time,
uint32_t *max_subkeynamelen,
uint32_t *max_valnamelen,
uint32_t *max_valbufsize);
};
struct cli_credentials;
struct auth_session_info;
WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *location,
struct auth_session_info *session_info,
struct cli_credentials *credentials,
struct loadparm_context *lp_ctx,
struct hive_key **root);
WERROR hive_key_get_info(TALLOC_CTX *mem_ctx, const struct hive_key *key,
const char **classname, uint32_t *num_subkeys,
uint32_t *num_values, NTTIME *last_change_time,
uint32_t *max_subkeynamelen,
uint32_t *max_valnamelen, uint32_t *max_valbufsize);
WERROR hive_key_add_name(TALLOC_CTX *ctx, const struct hive_key *parent_key,
const char *name, const char *classname,
struct security_descriptor *desc,
struct hive_key **key);
WERROR hive_key_del(const struct hive_key *key, const char *name);
WERROR hive_get_key_by_name(TALLOC_CTX *mem_ctx,
const struct hive_key *key, const char *name,
struct hive_key **subkey);
WERROR hive_enum_key(TALLOC_CTX *mem_ctx,
const struct hive_key *key, uint32_t idx,
const char **name,
const char **classname,
NTTIME *last_mod_time);
WERROR hive_key_set_value(struct hive_key *key, const char *name,
uint32_t type, const DATA_BLOB data);
WERROR hive_get_value(TALLOC_CTX *mem_ctx,
struct hive_key *key, const char *name,
uint32_t *type, DATA_BLOB *data);
WERROR hive_get_value_by_index(TALLOC_CTX *mem_ctx,
struct hive_key *key, uint32_t idx,
const char **name,
uint32_t *type, DATA_BLOB *data);
WERROR hive_key_del_value(struct hive_key *key, const char *name);
WERROR hive_key_flush(struct hive_key *key);
/* Individual backends */
WERROR reg_open_directory(TALLOC_CTX *parent_ctx,
const char *location, struct hive_key **key);
WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx,
const char *location, struct smb_iconv_convenience *iconv_convenience,
struct hive_key **key);
WERROR reg_open_ldb_file(TALLOC_CTX *parent_ctx, const char *location,
struct auth_session_info *session_info,
struct cli_credentials *credentials,
struct loadparm_context *lp_ctx,
struct hive_key **k);
WERROR reg_create_directory(TALLOC_CTX *parent_ctx,
const char *location, struct hive_key **key);
WERROR reg_create_regf_file(TALLOC_CTX *parent_ctx,
struct smb_iconv_convenience *iconv_convenience,
const char *location,
int major_version,
struct hive_key **key);
/* Handles for the predefined keys */
#define HKEY_CLASSES_ROOT 0x80000000
@ -66,8 +251,6 @@ struct registry_key
struct registry_context *context;
};
#include "lib/registry/patchfile.h"
struct registry_value
{
const char *name;
@ -285,5 +468,34 @@ WERROR reg_get_security(TALLOC_CTX *mem_ctx,
WERROR reg_set_security(struct registry_key *key,
struct security_descriptor *security);
struct reg_diff_callbacks {
WERROR (*add_key) (void *callback_data, const char *key_name);
WERROR (*set_value) (void *callback_data, const char *key_name,
const char *value_name, uint32_t value_type,
DATA_BLOB value);
WERROR (*del_value) (void *callback_data, const char *key_name,
const char *value_name);
WERROR (*del_key) (void *callback_data, const char *key_name);
WERROR (*del_all_values) (void *callback_data, const char *key_name);
WERROR (*done) (void *callback_data);
};
WERROR reg_diff_apply(struct registry_context *ctx, const char *filename);
WERROR reg_generate_diff(struct registry_context *ctx1,
struct registry_context *ctx2,
const struct reg_diff_callbacks *callbacks,
void *callback_data);
WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename,
struct smb_iconv_convenience *iconv_convenience,
struct reg_diff_callbacks **callbacks,
void **callback_data);
WERROR reg_generate_diff_key(struct registry_key *oldkey,
struct registry_key *newkey,
const char *path,
const struct reg_diff_callbacks *callbacks,
void *callback_data);
#endif /* _REGISTRY_H */

View File

@ -26,7 +26,6 @@
#include "includes.h"
#include "registry.h"
#include "param/param.h"
#include "hive.h"
typedef struct registry_context reg;
typedef struct hive_key hive_key;

View File

@ -5,8 +5,8 @@ includedir=@includedir@
Name: registry
Description: Windows-style registry library
Requires: ldb
Requires.private:
Requires: talloc
Requires.private: ldb
Version: 0.0.1
Libs: -L${libdir} -lregistry
Cflags: -I${includedir} -DHAVE_IMMEDIATE_STRUCTURES=1

View File

@ -2529,7 +2529,6 @@ static swig_module_info swig_module = {swig_types, 25, 0, 0, 0, 0};
#include "includes.h"
#include "registry.h"
#include "param/param.h"
#include "hive.h"
typedef struct registry_context reg;
typedef struct hive_key hive_key;

View File

@ -112,7 +112,7 @@ static bool test_reg_val_description_nullname(struct torture_context *ctx)
return true;
}
_PUBLIC_ struct torture_suite *torture_registry(TALLOC_CTX *mem_ctx)
struct torture_suite *torture_registry(TALLOC_CTX *mem_ctx)
{
struct torture_suite *suite = torture_suite_create(mem_ctx, "REGISTRY");
torture_suite_add_simple_test(suite, "str_regtype",

View File

@ -7,7 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,

View File

@ -7,7 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,

View File

@ -23,7 +23,6 @@
#include "lib/registry/registry.h"
#include "lib/cmdline/popt_common.h"
#include "lib/registry/tools/common.h"
#include "lib/registry/patchfile.h"
#include "param/param.h"
int main(int argc, char **argv)

View File

@ -23,7 +23,7 @@ done
SMB_SUBSYSTEM(LIBREPLACE,
[${LIBREPLACE_OBJS}],
[LIBREPLACE_EXT],
[LIBREPLACE_EXT LIBREPLACE_NETWORK],
[-Ilib/replace])
LIBREPLACE_HOSTCC_OBJS=`echo ${LIBREPLACE_OBJS} |sed -e 's/\.o/\.ho/g'`

View File

@ -5,6 +5,4 @@ PRIVATE_DEPENDENCIES = LIBREPLACE_NETWORK
# End SUBSYSTEM SOCKET_WRAPPER
##############################
PUBLIC_HEADERS += lib/socket_wrapper/socket_wrapper.h
SOCKET_WRAPPER_OBJ_FILES = lib/socket_wrapper/socket_wrapper.o

Some files were not shown because too many files have changed in this diff Show More