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

Install public header files again and include required prototypes.

(This used to be commit 47ffbbf674)
This commit is contained in:
Jelmer Vernooij 2008-04-02 04:53:27 +02:00
parent 7b608fd288
commit afe3e8172d
208 changed files with 1953 additions and 458 deletions

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "lib/util/dlinklist.h"
#include "auth/auth.h"
#include "auth/auth_proto.h"
#include "lib/events/events.h"
#include "build.h"
#include "param/param.h"
@ -28,7 +29,7 @@
/***************************************************************************
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);
@ -146,7 +147,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)
@ -218,7 +219,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)
@ -320,7 +321,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)
{
@ -350,7 +351,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,
@ -413,7 +414,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,
@ -447,7 +448,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;
@ -512,7 +513,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;

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

@ -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,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

@ -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

@ -27,6 +27,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 */
@ -35,7 +36,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;
}
@ -45,7 +46,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)
{
@ -572,7 +573,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,
@ -637,7 +638,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);
@ -663,7 +664,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);
@ -674,7 +675,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);
@ -704,7 +705,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);
@ -720,7 +721,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);
@ -769,7 +770,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);
@ -783,7 +784,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,
@ -802,7 +803,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,
@ -818,7 +819,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,
@ -834,7 +835,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,
@ -850,7 +851,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;
@ -880,7 +881,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)
@ -891,7 +892,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)
@ -902,7 +903,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) {
@ -925,7 +926,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) {
@ -1065,7 +1066,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;
@ -1135,7 +1136,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)) {
@ -1144,7 +1145,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)) {
@ -1164,7 +1165,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;
@ -1264,7 +1265,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;

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

@ -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

@ -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

@ -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

@ -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
@ -59,34 +58,19 @@ 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/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
@ -96,24 +80,17 @@ 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
lib/util/util_tdb.h: util_tdb.h
lib/util/util_ldb.h: util_ldb.h
lib/util/wrap_xattr.h: wrap_xattr.h

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"

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

@ -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

@ -5,4 +5,3 @@ CFLAGS = -Ilib/talloc
MANPAGES += $(tallocdir)/talloc.3
PUBLIC_HEADERS += $(tallocdir)/talloc.h

View File

@ -33,6 +33,7 @@ PUBLIC_HEADERS += $(addprefix lib/util/, util.h \
mutex.h \
safe_string.h \
time.h \
util_ldb.h \
xfile.h)
[SUBSYSTEM::ASN1_UTIL]
@ -48,7 +49,6 @@ OBJ_FILES = unix_privs.o
################################################
# Start SUBSYSTEM WRAP_XATTR
[SUBSYSTEM::WRAP_XATTR]
PRIVATE_PROTO_HEADER = wrap_xattr.h
OBJ_FILES = \
wrap_xattr.o
PUBLIC_DEPENDENCIES = XATTR
@ -63,7 +63,6 @@ OBJ_FILES = \
PUBLIC_DEPENDENCIES = LIBTDB
[SUBSYSTEM::UTIL_LDB]
PRIVATE_PROTO_HEADER = util_ldb.h
OBJ_FILES = \
util_ldb.o
PUBLIC_DEPENDENCIES = LIBLDB

View File

@ -42,7 +42,7 @@ void d_set_iconv(smb_iconv_t cd)
display_cd = cd;
}
_PUBLIC_ int d_vfprintf(FILE *f, const char *format, va_list ap) _PRINTF_ATTRIBUTE(2,0)
_PUBLIC_ int d_vfprintf(FILE *f, const char *format, va_list ap)
{
char *p, *p2;
int ret, clen;
@ -85,7 +85,7 @@ _PUBLIC_ int d_vfprintf(FILE *f, const char *format, va_list ap) _PRINTF_ATTRIBU
}
_PUBLIC_ int d_fprintf(FILE *f, const char *format, ...) _PRINTF_ATTRIBUTE(2,3)
_PUBLIC_ int d_fprintf(FILE *f, const char *format, ...)
{
int ret;
va_list ap;
@ -97,7 +97,7 @@ _PUBLIC_ int d_fprintf(FILE *f, const char *format, ...) _PRINTF_ATTRIBUTE(2,3)
return ret;
}
_PUBLIC_ int d_printf(const char *format, ...) _PRINTF_ATTRIBUTE(1,2)
_PUBLIC_ int d_printf(const char *format, ...)
{
int ret;
va_list ap;

View File

@ -356,7 +356,7 @@ _PUBLIC_ bool file_save(const char *fname, const void *packet, size_t length)
return true;
}
_PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap) _PRINTF_ATTRIBUTE(2,0)
_PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap)
{
char *p;
int len, ret;
@ -371,7 +371,7 @@ _PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap) _PRINTF_ATTRIBUTE
return ret;
}
_PUBLIC_ int fdprintf(int fd, const char *format, ...) _PRINTF_ATTRIBUTE(2,3)
_PUBLIC_ int fdprintf(int fd, const char *format, ...)
{
va_list ap;
int ret;

View File

@ -33,7 +33,7 @@ int gendb_search_v(struct ldb_context *ldb,
struct ldb_message ***msgs,
const char * const *attrs,
const char *format,
va_list ap) _PRINTF_ATTRIBUTE(6,0)
va_list ap)
{
enum ldb_scope scope = LDB_SCOPE_SUBTREE;
struct ldb_result *res;
@ -85,7 +85,7 @@ int gendb_search(struct ldb_context *ldb,
struct ldb_dn *basedn,
struct ldb_message ***res,
const char * const *attrs,
const char *format, ...) _PRINTF_ATTRIBUTE(6,7)
const char *format, ...)
{
va_list ap;
int count;

View File

@ -0,0 +1,26 @@
#ifndef __LIB_UTIL_UTIL_LDB_H__
#define __LIB_UTIL_UTIL_LDB_H__
int gendb_search_v(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
struct ldb_dn *basedn,
struct ldb_message ***msgs,
const char * const *attrs,
const char *format,
va_list ap) _PRINTF_ATTRIBUTE(6,0);
int gendb_search(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
struct ldb_dn *basedn,
struct ldb_message ***res,
const char * const *attrs,
const char *format, ...) _PRINTF_ATTRIBUTE(6,7);
int gendb_search_dn(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
struct ldb_dn *dn,
struct ldb_message ***res,
const char * const *attrs);
int gendb_add_ldif(struct ldb_context *ldb, const char *ldif_string);
char *wrap_casefold(void *context, void *mem_ctx, const char *s);
#endif /* __LIB_UTIL_UTIL_LDB_H__ */

View File

@ -0,0 +1,12 @@
#ifndef __LIB_UTIL_WRAP_XATTR_H__
#define __LIB_UTIL_WRAP_XATTR_H__
ssize_t wrap_fgetxattr(int fd, const char *name, void *value, size_t size);
ssize_t wrap_getxattr(const char *path, const char *name, void *value, size_t size);
int wrap_fsetxattr(int fd, const char *name, void *value, size_t size, int flags);
int wrap_setxattr(const char *path, const char *name, void *value, size_t size, int flags);
int wrap_fremovexattr(int fd, const char *name);
int wrap_removexattr(const char *path, const char *name);
#endif /* __LIB_UTIL_WRAP_XATTR_H__ */

View File

@ -63,7 +63,7 @@ bool SMBencrypt(const char *passwd, const uint8_t *c8, uint8_t p24[24])
* @param p16 return password hashed with md4, caller allocated 16 byte buffer
*/
_PUBLIC_ bool E_md4hash(const char *passwd, uint8_t p16[16])
bool E_md4hash(const char *passwd, uint8_t p16[16])
{
int len;
void *wpwd;
@ -91,7 +91,7 @@ _PUBLIC_ bool E_md4hash(const char *passwd, uint8_t p16[16])
* @note p16 is filled in regardless
*/
_PUBLIC_ bool E_deshash(const char *passwd, uint8_t p16[16])
bool E_deshash(const char *passwd, uint8_t p16[16])
{
bool ret = true;
fstring dospwd;

View File

@ -23,6 +23,7 @@
#include "includes.h"
#include "libcli/libcli.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/auth/libcli_auth.h"
#include "libcli/smb_composite/smb_composite.h"
#include "param/param.h"

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/libcli.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
struct search_private {
struct clilist_file_info *dirlist;

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/libcli.h"

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/libcli.h"
/****************************************************************************

View File

@ -19,6 +19,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __COMPOSITE_H__
#define __COMPOSITE_H__
#include "libcli/raw/interfaces.h"
/*
@ -68,4 +71,36 @@ struct smb2_request;
struct rpc_request;
struct nbt_name_request;
#include "libcli/composite/proto.h"
struct composite_context *composite_create(TALLOC_CTX *mem_ctx, struct event_context *ev);
bool composite_nomem(const void *p, struct composite_context *ctx);
void composite_continue(struct composite_context *ctx,
struct composite_context *new_ctx,
void (*continuation)(struct composite_context *),
void *private_data);
void composite_continue_rpc(struct composite_context *ctx,
struct rpc_request *new_req,
void (*continuation)(struct rpc_request *),
void *private_data);
void composite_continue_irpc(struct composite_context *ctx,
struct irpc_request *new_req,
void (*continuation)(struct irpc_request *),
void *private_data);
void composite_continue_smb(struct composite_context *ctx,
struct smbcli_request *new_req,
void (*continuation)(struct smbcli_request *),
void *private_data);
void composite_continue_smb2(struct composite_context *ctx,
struct smb2_request *new_req,
void (*continuation)(struct smb2_request *),
void *private_data);
void composite_continue_nbt(struct composite_context *ctx,
struct nbt_name_request *new_req,
void (*continuation)(struct nbt_name_request *),
void *private_data);
bool composite_is_ok(struct composite_context *ctx);
void composite_done(struct composite_context *ctx);
void composite_error(struct composite_context *ctx, NTSTATUS status);
NTSTATUS composite_wait(struct composite_context *c);
#endif /* __COMPOSITE_H__ */

View File

@ -10,9 +10,8 @@ PUBLIC_DEPENDENCIES = LIBSAMBA-ERRORS LIBEVENTS LIBPACKET
PRIVATE_DEPENDENCIES = LIBCLI_COMPOSITE samba-socket NDR_SAMR LIBTLS ASN1_UTIL \
LDAP_ENCODE LIBNDR LP_RESOLVE gensec
PUBLIC_HEADERS += libcli/ldap/ldap.h
PUBLIC_HEADERS += libcli/ldap/ldap.h libcli/ldap/ldap_ndr.h
[SUBSYSTEM::LDAP_ENCODE]
PRIVATE_PROTO_HEADER = ldap_ndr.h
OBJ_FILES = ldap_ndr.o
# FIXME PRIVATE_DEPENDENCIES = LIBLDB

View File

@ -25,6 +25,7 @@
#include "includes.h"
#include "lib/util/asn1.h"
#include "libcli/ldap/ldap.h"
#include "libcli/ldap/ldap_proto.h"
static bool ldap_push_filter(struct asn1_data *data, struct ldb_parse_tree *tree)
@ -187,7 +188,7 @@ static void ldap_encode_response(struct asn1_data *data, struct ldap_Result *res
}
}
bool ldap_encode(struct ldap_message *msg, DATA_BLOB *result, TALLOC_CTX *mem_ctx)
_PUBLIC_ bool ldap_encode(struct ldap_message *msg, DATA_BLOB *result, TALLOC_CTX *mem_ctx)
{
struct asn1_data *data = asn1_init(mem_ctx);
int i, j;
@ -927,7 +928,7 @@ static void ldap_decode_attribs(TALLOC_CTX *mem_ctx, struct asn1_data *data,
/* This routine returns LDAP status codes */
NTSTATUS ldap_decode(struct asn1_data *data, struct ldap_message *msg)
_PUBLIC_ NTSTATUS ldap_decode(struct asn1_data *data, struct ldap_message *msg)
{
uint8_t tag;

View File

@ -254,6 +254,8 @@ struct cli_credentials;
struct dom_sid;
struct asn1_data;
#include "libcli/ldap/ldap_proto.h"
struct ldap_message *new_ldap_message(TALLOC_CTX *mem_ctx);
NTSTATUS ldap_decode(struct asn1_data *data, struct ldap_message *msg);
bool ldap_encode(struct ldap_message *msg, DATA_BLOB *result, TALLOC_CTX *mem_ctx);
#endif

View File

@ -23,6 +23,7 @@
#include "includes.h"
#include "libcli/ldap/ldap.h"
#include "libcli/ldap/ldap_proto.h"
#include "libcli/ldap/ldap_client.h"
#include "lib/tls/tls.h"
#include "auth/gensec/gensec.h"
@ -35,7 +36,7 @@ struct ldap_simple_creds {
const char *pw;
};
NTSTATUS ldap_rebind(struct ldap_connection *conn)
_PUBLIC_ NTSTATUS ldap_rebind(struct ldap_connection *conn)
{
NTSTATUS status;
struct ldap_simple_creds *creds;
@ -88,7 +89,7 @@ static struct ldap_message *new_ldap_simple_bind_msg(struct ldap_connection *con
/*
perform a simple username/password bind
*/
NTSTATUS ldap_bind_simple(struct ldap_connection *conn,
_PUBLIC_ NTSTATUS ldap_bind_simple(struct ldap_connection *conn,
const char *userdn, const char *password)
{
struct ldap_request *req;
@ -199,7 +200,7 @@ static struct ldap_message *new_ldap_sasl_bind_msg(struct ldap_connection *conn,
/*
perform a sasl bind using the given credentials
*/
NTSTATUS ldap_bind_sasl(struct ldap_connection *conn,
_PUBLIC_ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn,
struct cli_credentials *creds,
struct loadparm_context *lp_ctx)
{

View File

@ -28,6 +28,7 @@
#include "lib/events/events.h"
#include "lib/socket/socket.h"
#include "libcli/ldap/ldap.h"
#include "libcli/ldap/ldap_proto.h"
#include "libcli/ldap/ldap_client.h"
#include "libcli/composite/composite.h"
#include "lib/stream/packet.h"
@ -41,7 +42,7 @@
/**
create a new ldap_connection stucture. The event context is optional
*/
struct ldap_connection *ldap4_new_connection(TALLOC_CTX *mem_ctx,
_PUBLIC_ struct ldap_connection *ldap4_new_connection(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
struct event_context *ev)
{
@ -293,7 +294,7 @@ struct ldap_connect_state {
static void ldap_connect_recv_unix_conn(struct composite_context *ctx);
static void ldap_connect_recv_tcp_conn(struct composite_context *ctx);
struct composite_context *ldap_connect_send(struct ldap_connection *conn,
_PUBLIC_ struct composite_context *ldap_connect_send(struct ldap_connection *conn,
const char *url)
{
struct composite_context *result, *ctx;
@ -476,7 +477,7 @@ _PUBLIC_ NTSTATUS ldap_connect_recv(struct composite_context *ctx)
return status;
}
NTSTATUS ldap_connect(struct ldap_connection *conn, const char *url)
_PUBLIC_ NTSTATUS ldap_connect(struct ldap_connection *conn, const char *url)
{
struct composite_context *ctx = ldap_connect_send(conn, url);
return ldap_connect_recv(ctx);
@ -484,7 +485,7 @@ NTSTATUS ldap_connect(struct ldap_connection *conn, const char *url)
/* set reconnect parameters */
void ldap_set_reconn_params(struct ldap_connection *conn, int max_retries)
_PUBLIC_ void ldap_set_reconn_params(struct ldap_connection *conn, int max_retries)
{
if (conn) {
conn->reconnect.max_retries = max_retries;
@ -569,7 +570,7 @@ static void ldap_request_complete(struct event_context *ev, struct timed_event *
/*
send a ldap message - async interface
*/
struct ldap_request *ldap_request_send(struct ldap_connection *conn,
_PUBLIC_ struct ldap_request *ldap_request_send(struct ldap_connection *conn,
struct ldap_message *msg)
{
struct ldap_request *req;
@ -645,7 +646,7 @@ failed:
wait for a request to complete
note that this does not destroy the request
*/
NTSTATUS ldap_request_wait(struct ldap_request *req)
_PUBLIC_ NTSTATUS ldap_request_wait(struct ldap_request *req)
{
while (req->state < LDAP_REQUEST_DONE) {
if (event_loop_once(req->conn->event.event_ctx) != 0) {
@ -709,7 +710,7 @@ static const struct {
/*
used to setup the status code from a ldap response
*/
NTSTATUS ldap_check_response(struct ldap_connection *conn, struct ldap_Result *r)
_PUBLIC_ NTSTATUS ldap_check_response(struct ldap_connection *conn, struct ldap_Result *r)
{
int i;
const char *codename = "unknown";
@ -742,7 +743,7 @@ NTSTATUS ldap_check_response(struct ldap_connection *conn, struct ldap_Result *r
/*
return error string representing the last error
*/
const char *ldap_errstr(struct ldap_connection *conn,
_PUBLIC_ const char *ldap_errstr(struct ldap_connection *conn,
TALLOC_CTX *mem_ctx,
NTSTATUS status)
{
@ -756,7 +757,7 @@ const char *ldap_errstr(struct ldap_connection *conn,
/*
return the Nth result message, waiting if necessary
*/
NTSTATUS ldap_result_n(struct ldap_request *req, int n, struct ldap_message **msg)
_PUBLIC_ NTSTATUS ldap_result_n(struct ldap_request *req, int n, struct ldap_message **msg)
{
*msg = NULL;
@ -784,7 +785,7 @@ NTSTATUS ldap_result_n(struct ldap_request *req, int n, struct ldap_message **ms
/*
return a single result message, checking if it is of the expected LDAP type
*/
NTSTATUS ldap_result_one(struct ldap_request *req, struct ldap_message **msg, int type)
_PUBLIC_ NTSTATUS ldap_result_one(struct ldap_request *req, struct ldap_message **msg, int type)
{
NTSTATUS status;
status = ldap_result_n(req, 0, msg);
@ -802,7 +803,7 @@ NTSTATUS ldap_result_one(struct ldap_request *req, struct ldap_message **msg, in
a simple ldap transaction, for single result requests that only need a status code
this relies on single valued requests having the response type == request type + 1
*/
NTSTATUS ldap_transaction(struct ldap_connection *conn, struct ldap_message *msg)
_PUBLIC_ NTSTATUS ldap_transaction(struct ldap_connection *conn, struct ldap_message *msg)
{
struct ldap_request *req = ldap_request_send(conn, msg);
struct ldap_message *res;

View File

@ -94,3 +94,47 @@ struct ldap_connection {
struct packet_context *packet;
};
struct ldap_connection *ldap4_new_connection(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
struct event_context *ev);
NTSTATUS ldap_connect(struct ldap_connection *conn, const char *url);
struct composite_context *ldap_connect_send(struct ldap_connection *conn,
const char *url);
NTSTATUS ldap_rebind(struct ldap_connection *conn);
NTSTATUS ldap_bind_simple(struct ldap_connection *conn,
const char *userdn, const char *password);
NTSTATUS ldap_bind_sasl(struct ldap_connection *conn,
struct cli_credentials *creds,
struct loadparm_context *lp_ctx);
struct ldap_request *ldap_request_send(struct ldap_connection *conn,
struct ldap_message *msg);
NTSTATUS ldap_request_wait(struct ldap_request *req);
struct composite_context;
NTSTATUS ldap_connect_recv(struct composite_context *ctx);
NTSTATUS ldap_result_n(struct ldap_request *req, int n, struct ldap_message **msg);
NTSTATUS ldap_result_one(struct ldap_request *req, struct ldap_message **msg, int type);
NTSTATUS ldap_transaction(struct ldap_connection *conn, struct ldap_message *msg);
const char *ldap_errstr(struct ldap_connection *conn,
TALLOC_CTX *mem_ctx,
NTSTATUS status);
NTSTATUS ldap_check_response(struct ldap_connection *conn, struct ldap_Result *r);
void ldap_set_reconn_params(struct ldap_connection *conn, int max_retries);
int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res);
NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn,
int scope, struct ldb_parse_tree *tree,
const char * const *attrs, bool attributesonly,
struct ldb_control **control_req,
struct ldb_control ***control_res,
struct ldap_message ***results);
NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn,
int scope, const char *expression,
const char * const *attrs, bool attributesonly,
struct ldb_control **control_req,
struct ldb_control ***control_res,
struct ldap_message ***results);

View File

@ -28,7 +28,7 @@
/*
count the returned search entries
*/
int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res)
_PUBLIC_ int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res)
{
int i;
for (i=0;res && res[i];i++) /* noop */ ;
@ -39,7 +39,7 @@ int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res)
/*
perform a synchronous ldap search
*/
NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn,
_PUBLIC_ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn,
int scope, struct ldb_parse_tree *tree,
const char * const *attrs, bool attributesonly,
struct ldb_control **control_req,
@ -112,7 +112,7 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn,
/*
perform a ldap search
*/
NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn,
_PUBLIC_ NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn,
int scope, const char *expression,
const char * const *attrs, bool attributesonly,
struct ldb_control **control_req,

View File

@ -26,7 +26,7 @@
#include "libcli/ldap/ldap_client.h"
struct ldap_message *new_ldap_message(TALLOC_CTX *mem_ctx)
_PUBLIC_ struct ldap_message *new_ldap_message(TALLOC_CTX *mem_ctx)
{
return talloc_zero(mem_ctx, struct ldap_message);
}

View File

@ -23,6 +23,7 @@
#define __LIBNBT_H__
#include "librpc/gen_ndr/nbt.h"
#include "librpc/ndr/libndr.h"
/*
possible states for pending requests
@ -273,6 +274,78 @@ struct nbt_name_release {
} out;
};
#include "libcli/nbt/nbt_proto.h"
struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
struct event_context *event_ctx,
struct smb_iconv_convenience *iconv_convenience);
struct nbt_name_request *nbt_name_query_send(struct nbt_name_socket *nbtsock,
struct nbt_name_query *io);
NTSTATUS nbt_name_query_recv(struct nbt_name_request *req,
TALLOC_CTX *mem_ctx, struct nbt_name_query *io);
NTSTATUS nbt_name_query(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx, struct nbt_name_query *io);
struct nbt_name_request *nbt_name_status_send(struct nbt_name_socket *nbtsock,
struct nbt_name_status *io);
NTSTATUS nbt_name_status_recv(struct nbt_name_request *req,
TALLOC_CTX *mem_ctx, struct nbt_name_status *io);
NTSTATUS nbt_name_status(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx, struct nbt_name_status *io);
NTSTATUS nbt_name_dup(TALLOC_CTX *mem_ctx, struct nbt_name *name, struct nbt_name *newname);
NTSTATUS nbt_name_to_blob(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, DATA_BLOB *blob, struct nbt_name *name);
NTSTATUS nbt_name_from_blob(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, struct nbt_name *name);
void nbt_choose_called_name(TALLOC_CTX *mem_ctx, struct nbt_name *n, const char *name, int type);
char *nbt_name_string(TALLOC_CTX *mem_ctx, const struct nbt_name *name);
NTSTATUS nbt_name_register(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx, struct nbt_name_register *io);
NTSTATUS nbt_name_refresh(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx, struct nbt_name_refresh *io);
NTSTATUS nbt_name_release(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx, struct nbt_name_release *io);
NTSTATUS nbt_name_register_wins(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx,
struct nbt_name_register_wins *io);
NTSTATUS nbt_name_refresh_wins(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx,
struct nbt_name_refresh_wins *io);
NTSTATUS nbt_name_register_recv(struct nbt_name_request *req,
TALLOC_CTX *mem_ctx, struct nbt_name_register *io);
struct nbt_name_request *nbt_name_register_send(struct nbt_name_socket *nbtsock,
struct nbt_name_register *io);
NTSTATUS nbt_name_release_recv(struct nbt_name_request *req,
TALLOC_CTX *mem_ctx, struct nbt_name_release *io);
struct nbt_name_request *nbt_name_release_send(struct nbt_name_socket *nbtsock,
struct nbt_name_release *io);
NTSTATUS nbt_name_refresh_recv(struct nbt_name_request *req,
TALLOC_CTX *mem_ctx, struct nbt_name_refresh *io);
NTSTATUS nbt_set_incoming_handler(struct nbt_name_socket *nbtsock,
void (*handler)(struct nbt_name_socket *, struct nbt_name_packet *,
struct socket_address *),
void *private);
NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock,
struct socket_address *dest,
struct nbt_name_packet *request);
NDR_SCALAR_PROTO(wrepl_nbt_name, const struct nbt_name *)
NDR_SCALAR_PROTO(nbt_string, const char *);
NDR_BUFFER_PROTO(nbt_name, struct nbt_name)
NTSTATUS nbt_rcode_to_ntstatus(uint8_t rcode);
struct composite_context;
struct composite_context *nbt_name_register_bcast_send(struct nbt_name_socket *nbtsock,
struct nbt_name_register_bcast *io);
NTSTATUS nbt_name_register_bcast_recv(struct composite_context *c);
struct composite_context *nbt_name_register_wins_send(struct nbt_name_socket *nbtsock,
struct nbt_name_register_wins *io);
NTSTATUS nbt_name_refresh_wins_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
struct nbt_name_refresh_wins *io);
struct composite_context *nbt_name_refresh_wins_send(struct nbt_name_socket *nbtsock,
struct nbt_name_refresh_wins *io);
NTSTATUS nbt_name_register_wins_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
struct nbt_name_register_wins *io);
#endif /* __LIBNBT_H__ */

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/nbt/libnbt.h"
#include "libcli/nbt/nbt_proto.h"
#include "lib/socket/socket.h"
#include "param/param.h"

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/nbt/libnbt.h"
#include "libcli/nbt/nbt_proto.h"
#include "libcli/composite/composite.h"
#include "lib/socket/socket.h"
#include "param/param.h"
@ -86,7 +87,7 @@ failed:
/*
wait for a refresh reply
*/
NTSTATUS nbt_name_refresh_recv(struct nbt_name_request *req,
_PUBLIC_ NTSTATUS nbt_name_refresh_recv(struct nbt_name_request *req,
TALLOC_CTX *mem_ctx, struct nbt_name_refresh *io)
{
NTSTATUS status;
@ -128,7 +129,7 @@ NTSTATUS nbt_name_refresh_recv(struct nbt_name_request *req,
/*
synchronous name refresh request
*/
NTSTATUS nbt_name_refresh(struct nbt_name_socket *nbtsock,
_PUBLIC_ NTSTATUS nbt_name_refresh(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx, struct nbt_name_refresh *io)
{
struct nbt_name_request *req = nbt_name_refresh_send(nbtsock, io);
@ -217,7 +218,7 @@ done:
/**
the async send call for a multi-server WINS refresh
*/
struct composite_context *nbt_name_refresh_wins_send(struct nbt_name_socket *nbtsock,
_PUBLIC_ struct composite_context *nbt_name_refresh_wins_send(struct nbt_name_socket *nbtsock,
struct nbt_name_refresh_wins *io)
{
struct composite_context *c;
@ -274,7 +275,7 @@ failed:
/*
multi-homed WINS name refresh - recv side
*/
NTSTATUS nbt_name_refresh_wins_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
_PUBLIC_ NTSTATUS nbt_name_refresh_wins_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
struct nbt_name_refresh_wins *io)
{
NTSTATUS status;
@ -292,7 +293,7 @@ NTSTATUS nbt_name_refresh_wins_recv(struct composite_context *c, TALLOC_CTX *mem
/*
multi-homed WINS refresh - sync interface
*/
NTSTATUS nbt_name_refresh_wins(struct nbt_name_socket *nbtsock,
_PUBLIC_ NTSTATUS nbt_name_refresh_wins(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx,
struct nbt_name_refresh_wins *io)
{

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/nbt/libnbt.h"
#include "libcli/nbt/nbt_proto.h"
#include "libcli/composite/composite.h"
#include "lib/socket/socket.h"
#include "librpc/gen_ndr/ndr_nbt.h"
@ -94,7 +95,7 @@ failed:
/*
wait for a registration reply
*/
NTSTATUS nbt_name_register_recv(struct nbt_name_request *req,
_PUBLIC_ NTSTATUS nbt_name_register_recv(struct nbt_name_request *req,
TALLOC_CTX *mem_ctx, struct nbt_name_register *io)
{
NTSTATUS status;
@ -136,7 +137,7 @@ NTSTATUS nbt_name_register_recv(struct nbt_name_request *req,
/*
synchronous name registration request
*/
NTSTATUS nbt_name_register(struct nbt_name_socket *nbtsock,
_PUBLIC_ NTSTATUS nbt_name_register(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx, struct nbt_name_register *io)
{
struct nbt_name_request *req = nbt_name_register_send(nbtsock, io);
@ -207,7 +208,7 @@ done:
/*
the async send call for a 4 stage name registration
*/
struct composite_context *nbt_name_register_bcast_send(struct nbt_name_socket *nbtsock,
_PUBLIC_ struct composite_context *nbt_name_register_bcast_send(struct nbt_name_socket *nbtsock,
struct nbt_name_register_bcast *io)
{
struct composite_context *c;
@ -256,7 +257,7 @@ failed:
/*
broadcast 4 part name register - recv
*/
NTSTATUS nbt_name_register_bcast_recv(struct composite_context *c)
_PUBLIC_ NTSTATUS nbt_name_register_bcast_recv(struct composite_context *c)
{
NTSTATUS status;
status = composite_wait(c);
@ -355,7 +356,7 @@ done:
/*
the async send call for a multi-server WINS register
*/
struct composite_context *nbt_name_register_wins_send(struct nbt_name_socket *nbtsock,
_PUBLIC_ struct composite_context *nbt_name_register_wins_send(struct nbt_name_socket *nbtsock,
struct nbt_name_register_wins *io)
{
struct composite_context *c;
@ -414,7 +415,7 @@ failed:
/*
multi-homed WINS name register - recv side
*/
NTSTATUS nbt_name_register_wins_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
_PUBLIC_ NTSTATUS nbt_name_register_wins_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
struct nbt_name_register_wins *io)
{
NTSTATUS status;
@ -432,7 +433,7 @@ NTSTATUS nbt_name_register_wins_recv(struct composite_context *c, TALLOC_CTX *me
/*
multi-homed WINS register - sync interface
*/
NTSTATUS nbt_name_register_wins(struct nbt_name_socket *nbtsock,
_PUBLIC_ NTSTATUS nbt_name_register_wins(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx,
struct nbt_name_register_wins *io)
{

View File

@ -21,13 +21,14 @@
#include "includes.h"
#include "libcli/nbt/libnbt.h"
#include "libcli/nbt/nbt_proto.h"
#include "lib/socket/socket.h"
#include "param/param.h"
/*
send a nbt name release request
*/
struct nbt_name_request *nbt_name_release_send(struct nbt_name_socket *nbtsock,
_PUBLIC_ struct nbt_name_request *nbt_name_release_send(struct nbt_name_socket *nbtsock,
struct nbt_name_release *io)
{
struct nbt_name_request *req;
@ -84,7 +85,7 @@ failed:
/*
wait for a release reply
*/
NTSTATUS nbt_name_release_recv(struct nbt_name_request *req,
_PUBLIC_ NTSTATUS nbt_name_release_recv(struct nbt_name_request *req,
TALLOC_CTX *mem_ctx, struct nbt_name_release *io)
{
NTSTATUS status;
@ -126,7 +127,7 @@ NTSTATUS nbt_name_release_recv(struct nbt_name_request *req,
/*
synchronous name release request
*/
NTSTATUS nbt_name_release(struct nbt_name_socket *nbtsock,
_PUBLIC_ NTSTATUS nbt_name_release(struct nbt_name_socket *nbtsock,
TALLOC_CTX *mem_ctx, struct nbt_name_release *io)
{
struct nbt_name_request *req = nbt_name_release_send(nbtsock, io);

View File

@ -500,7 +500,7 @@ _PUBLIC_ char *nbt_name_string(TALLOC_CTX *mem_ctx, const struct nbt_name *name)
/**
pull a nbt name, WINS Replication uses another on wire format for nbt name
*/
_PUBLIC_ enum ndr_err_code ndr_pull_wrepl_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_name **_r)
_PUBLIC_ enum ndr_err_code ndr_pull_wrepl_nbt_name(struct ndr_pull *ndr, int ndr_flags, const struct nbt_name **_r)
{
struct nbt_name *r;
uint8_t *namebuf;

View File

@ -423,7 +423,7 @@ failed:
/*
send off a nbt name reply
*/
NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock,
_PUBLIC_ NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock,
struct socket_address *dest,
struct nbt_name_packet *request)
{
@ -486,7 +486,7 @@ NTSTATUS nbt_name_request_recv(struct nbt_name_request *req)
/*
setup a handler for incoming requests
*/
NTSTATUS nbt_set_incoming_handler(struct nbt_name_socket *nbtsock,
_PUBLIC_ NTSTATUS nbt_set_incoming_handler(struct nbt_name_socket *nbtsock,
void (*handler)(struct nbt_name_socket *, struct nbt_name_packet *,
struct socket_address *),
void *private)
@ -501,7 +501,7 @@ NTSTATUS nbt_set_incoming_handler(struct nbt_name_socket *nbtsock,
/*
turn a NBT rcode into a NTSTATUS
*/
NTSTATUS nbt_rcode_to_ntstatus(uint8_t rcode)
_PUBLIC_ NTSTATUS nbt_rcode_to_ntstatus(uint8_t rcode)
{
int i;
struct {

View File

@ -25,7 +25,7 @@
/***************************************************************************
Return an error message from the last response
****************************************************************************/
const char *smbcli_errstr(struct smbcli_tree *tree)
_PUBLIC_ const char *smbcli_errstr(struct smbcli_tree *tree)
{
switch (tree->session->transport->error.etype) {
case ETYPE_SMB:
@ -45,7 +45,7 @@ const char *smbcli_errstr(struct smbcli_tree *tree)
/* Return the 32-bit NT status code from the last packet */
NTSTATUS smbcli_nt_error(struct smbcli_tree *tree)
_PUBLIC_ NTSTATUS smbcli_nt_error(struct smbcli_tree *tree)
{
switch (tree->session->transport->error.etype) {
case ETYPE_SMB:

View File

@ -19,6 +19,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
/****************************************************************************
send an ack for an oplock break request

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "system/filesys.h"
#include "param/param.h"
@ -291,7 +292,7 @@ struct smbcli_request *smb_raw_exit_send(struct smbcli_session *session)
/****************************************************************************
Send a exit (sync interface)
*****************************************************************************/
NTSTATUS smb_raw_exit(struct smbcli_session *session)
_PUBLIC_ NTSTATUS smb_raw_exit(struct smbcli_session *session)
{
struct smbcli_request *req = smb_raw_exit_send(session);
return smbcli_request_simple_recv(req);

View File

@ -170,7 +170,7 @@ NTSTATUS smbcli_sock_connect(TALLOC_CTX *mem_ctx,
/****************************************************************************
mark the socket as dead
****************************************************************************/
void smbcli_sock_dead(struct smbcli_socket *sock)
_PUBLIC_ void smbcli_sock_dead(struct smbcli_socket *sock)
{
talloc_free(sock->event.fde);
sock->event.fde = NULL;
@ -189,7 +189,7 @@ void smbcli_sock_set_options(struct smbcli_socket *sock, const char *options)
/****************************************************************************
resolve a hostname and connect
****************************************************************************/
struct smbcli_socket *smbcli_sock_connect_byname(const char *host, const char **ports,
_PUBLIC_ struct smbcli_socket *smbcli_sock_connect_byname(const char *host, const char **ports,
TALLOC_CTX *mem_ctx,
struct resolve_context *resolve_ctx,
struct event_context *event_ctx)

View File

@ -21,12 +21,14 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "lib/socket/socket.h"
#include "lib/util/dlinklist.h"
#include "lib/events/events.h"
#include "lib/stream/packet.h"
#include "librpc/gen_ndr/ndr_nbt.h"
#include "param/param.h"
#include "libcli/nbt/libnbt.h"
/*
@ -322,7 +324,7 @@ static void idle_handler(struct event_context *ev,
setup the idle handler for a transport
the period is in microseconds
*/
void smbcli_transport_idle_handler(struct smbcli_transport *transport,
_PUBLIC_ void smbcli_transport_idle_handler(struct smbcli_transport *transport,
void (*idle_func)(struct smbcli_transport *, void *),
uint64_t period,
void *private)
@ -502,7 +504,7 @@ error:
process some read/write requests that are pending
return false if the socket is dead
*/
bool smbcli_transport_process(struct smbcli_transport *transport)
_PUBLIC_ bool smbcli_transport_process(struct smbcli_transport *transport)
{
NTSTATUS status;
size_t npending;
@ -599,7 +601,7 @@ void smbcli_transport_send(struct smbcli_request *req)
/****************************************************************************
Send an SMBecho (async send)
*****************************************************************************/
struct smbcli_request *smb_raw_echo_send(struct smbcli_transport *transport,
_PUBLIC_ struct smbcli_request *smb_raw_echo_send(struct smbcli_transport *transport,
struct smb_echo *p)
{
struct smbcli_request *req;

View File

@ -22,6 +22,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/smb_composite/smb_composite.h"
#include "param/param.h"
@ -33,7 +34,7 @@
/****************************************************************************
Initialize the tree context
****************************************************************************/
struct smbcli_tree *smbcli_tree_init(struct smbcli_session *session,
_PUBLIC_ struct smbcli_tree *smbcli_tree_init(struct smbcli_session *session,
TALLOC_CTX *parent_ctx, bool primary)
{
struct smbcli_tree *tree;
@ -141,7 +142,7 @@ failed:
/****************************************************************************
Send a tconX (sync interface)
****************************************************************************/
NTSTATUS smb_raw_tcon(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx,
_PUBLIC_ NTSTATUS smb_raw_tcon(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx,
union smb_tcon *parms)
{
struct smbcli_request *req = smb_raw_tcon_send(tree, parms);
@ -152,7 +153,7 @@ NTSTATUS smb_raw_tcon(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx,
/****************************************************************************
Send a tree disconnect.
****************************************************************************/
NTSTATUS smb_tree_disconnect(struct smbcli_tree *tree)
_PUBLIC_ NTSTATUS smb_tree_disconnect(struct smbcli_tree *tree)
{
struct smbcli_request *req;

View File

@ -286,6 +286,80 @@ struct smbcli_request {
}
#include "libcli/raw/interfaces.h"
#include "libcli/raw/raw_proto.h"
NTSTATUS smb_raw_read_recv(struct smbcli_request *req, union smb_read *parms);
struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_read *parms);
NTSTATUS smb_raw_trans_recv(struct smbcli_request *req,
TALLOC_CTX *mem_ctx,
struct smb_trans2 *parms);
size_t smb_raw_max_trans_data(struct smbcli_tree *tree, size_t param_size);
struct smbcli_request *smb_raw_trans_send(struct smbcli_tree *tree, struct smb_trans2 *parms);
NTSTATUS smbcli_request_destroy(struct smbcli_request *req);
struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_write *parms);
struct smbcli_request *smb_raw_close_send(struct smbcli_tree *tree, union smb_close *parms);
NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, union smb_open *parms);
struct smbcli_request *smb_raw_open_send(struct smbcli_tree *tree, union smb_open *parms);
bool smbcli_transport_process(struct smbcli_transport *transport);
const char *smbcli_errstr(struct smbcli_tree *tree);
NTSTATUS smb_raw_fsinfo(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_fsinfo *fsinfo);
NTSTATUS smb_raw_pathinfo(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_fileinfo *parms);
NTSTATUS smb_raw_shadow_data(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, struct smb_shadow_copy *info);
NTSTATUS smb_raw_fileinfo(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_fileinfo *parms);
struct smbcli_tree *smbcli_tree_init(struct smbcli_session *session, TALLOC_CTX *parent_ctx, bool primary);
NTSTATUS smb_raw_tcon(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_tcon *parms);
void smbcli_oplock_handler(struct smbcli_transport *transport,
bool (*handler)(struct smbcli_transport *, uint16_t, uint16_t, uint8_t, void *),
void *private);
void smbcli_transport_idle_handler(struct smbcli_transport *transport,
void (*idle_func)(struct smbcli_transport *, void *),
uint64_t period,
void *private);
NTSTATUS smbcli_request_simple_recv(struct smbcli_request *req);
bool smbcli_oplock_ack(struct smbcli_tree *tree, uint16_t fnum, uint16_t ack_level);
NTSTATUS smb_raw_open(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_open *parms);
NTSTATUS smb_raw_close(struct smbcli_tree *tree, union smb_close *parms);
NTSTATUS smb_raw_unlink(struct smbcli_tree *tree, union smb_unlink *parms);
NTSTATUS smb_raw_chkpath(struct smbcli_tree *tree, union smb_chkpath *parms);
NTSTATUS smb_raw_mkdir(struct smbcli_tree *tree, union smb_mkdir *parms);
NTSTATUS smb_raw_rmdir(struct smbcli_tree *tree, struct smb_rmdir *parms);
NTSTATUS smb_raw_rename(struct smbcli_tree *tree, union smb_rename *parms);
NTSTATUS smb_raw_seek(struct smbcli_tree *tree, union smb_seek *parms);
NTSTATUS smb_raw_read(struct smbcli_tree *tree, union smb_read *parms);
NTSTATUS smb_raw_write(struct smbcli_tree *tree, union smb_write *parms);
NTSTATUS smb_raw_lock(struct smbcli_tree *tree, union smb_lock *parms);
NTSTATUS smb_raw_setpathinfo(struct smbcli_tree *tree, union smb_setfileinfo *parms);
NTSTATUS smb_raw_setfileinfo(struct smbcli_tree *tree, union smb_setfileinfo *parms);
struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, union smb_notify *parms);
NTSTATUS smb_raw_changenotify_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, union smb_notify *parms);
NTSTATUS smb_tree_disconnect(struct smbcli_tree *tree);
NTSTATUS smbcli_nt_error(struct smbcli_tree *tree);
NTSTATUS smb_raw_exit(struct smbcli_session *session);
NTSTATUS smb_raw_pathinfo_recv(struct smbcli_request *req,
TALLOC_CTX *mem_ctx,
union smb_fileinfo *parms);
struct smbcli_request *smb_raw_pathinfo_send(struct smbcli_tree *tree,
union smb_fileinfo *parms);
struct smbcli_request *smb_raw_setpathinfo_send(struct smbcli_tree *tree,
union smb_setfileinfo *parms);
struct smbcli_request *smb_raw_echo_send(struct smbcli_transport *transport,
struct smb_echo *p);
NTSTATUS smb_raw_search_first(struct smbcli_tree *tree,
TALLOC_CTX *mem_ctx,
union smb_search_first *io, void *private,
smbcli_search_callback callback);
NTSTATUS smb_raw_flush(struct smbcli_tree *tree, union smb_flush *parms);
NTSTATUS smb_raw_trans(struct smbcli_tree *tree,
TALLOC_CTX *mem_ctx,
struct smb_trans2 *parms);
struct smbcli_socket *smbcli_sock_connect_byname(const char *host, const char **ports,
TALLOC_CTX *mem_ctx,
struct resolve_context *resolve_ctx,
struct event_context *event_ctx);
void smbcli_sock_dead(struct smbcli_socket *sock);
#endif /* __LIBCLI_RAW__H__ */

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "param/param.h"

View File

@ -22,6 +22,7 @@
#include "includes.h"
#include "smb.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "librpc/gen_ndr/ndr_security.h"
#define SETUP_REQUEST(cmd, wct, buflen) do { \
@ -92,7 +93,7 @@ struct smbcli_request *smb_raw_rename_send(struct smbcli_tree *tree,
/****************************************************************************
Rename a file - sync interface
****************************************************************************/
NTSTATUS smb_raw_rename(struct smbcli_tree *tree,
_PUBLIC_ NTSTATUS smb_raw_rename(struct smbcli_tree *tree,
union smb_rename *parms)
{
struct smbcli_request *req = smb_raw_rename_send(tree, parms);
@ -123,7 +124,7 @@ struct smbcli_request *smb_raw_unlink_send(struct smbcli_tree *tree,
/*
delete a file - sync interface
*/
NTSTATUS smb_raw_unlink(struct smbcli_tree *tree,
_PUBLIC_ NTSTATUS smb_raw_unlink(struct smbcli_tree *tree,
union smb_unlink *parms)
{
struct smbcli_request *req = smb_raw_unlink_send(tree, parms);
@ -201,7 +202,7 @@ struct smbcli_request *smb_raw_mkdir_send(struct smbcli_tree *tree,
/****************************************************************************
Create a directory - sync interface
****************************************************************************/
NTSTATUS smb_raw_mkdir(struct smbcli_tree *tree,
_PUBLIC_ NTSTATUS smb_raw_mkdir(struct smbcli_tree *tree,
union smb_mkdir *parms)
{
struct smbcli_request *req = smb_raw_mkdir_send(tree, parms);
@ -231,7 +232,7 @@ struct smbcli_request *smb_raw_rmdir_send(struct smbcli_tree *tree,
/****************************************************************************
Remove a directory - sync interface
****************************************************************************/
NTSTATUS smb_raw_rmdir(struct smbcli_tree *tree,
_PUBLIC_ NTSTATUS smb_raw_rmdir(struct smbcli_tree *tree,
struct smb_rmdir *parms)
{
struct smbcli_request *req = smb_raw_rmdir_send(tree, parms);
@ -448,7 +449,7 @@ static NTSTATUS smb_raw_t2open_recv(struct smbcli_request *req, TALLOC_CTX *mem_
/****************************************************************************
Open a file - async send
****************************************************************************/
struct smbcli_request *smb_raw_open_send(struct smbcli_tree *tree, union smb_open *parms)
_PUBLIC_ struct smbcli_request *smb_raw_open_send(struct smbcli_tree *tree, union smb_open *parms)
{
int len;
struct smbcli_request *req = NULL;
@ -585,7 +586,7 @@ struct smbcli_request *smb_raw_open_send(struct smbcli_tree *tree, union smb_ope
/****************************************************************************
Open a file - async recv
****************************************************************************/
NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, union smb_open *parms)
_PUBLIC_ NTSTATUS smb_raw_open_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx, union smb_open *parms)
{
NTSTATUS status;
@ -720,7 +721,7 @@ failed:
/****************************************************************************
Open a file - sync interface
****************************************************************************/
NTSTATUS smb_raw_open(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_open *parms)
_PUBLIC_ NTSTATUS smb_raw_open(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_open *parms)
{
struct smbcli_request *req = smb_raw_open_send(tree, parms);
return smb_raw_open_recv(req, mem_ctx, parms);
@ -730,7 +731,7 @@ NTSTATUS smb_raw_open(struct smbcli_tree *tree, TALLOC_CTX *mem_ctx, union smb_o
/****************************************************************************
Close a file - async send
****************************************************************************/
struct smbcli_request *smb_raw_close_send(struct smbcli_tree *tree, union smb_close *parms)
_PUBLIC_ struct smbcli_request *smb_raw_close_send(struct smbcli_tree *tree, union smb_close *parms)
{
struct smbcli_request *req = NULL;
@ -766,7 +767,7 @@ struct smbcli_request *smb_raw_close_send(struct smbcli_tree *tree, union smb_cl
/****************************************************************************
Close a file - sync interface
****************************************************************************/
NTSTATUS smb_raw_close(struct smbcli_tree *tree, union smb_close *parms)
_PUBLIC_ NTSTATUS smb_raw_close(struct smbcli_tree *tree, union smb_close *parms)
{
struct smbcli_request *req = smb_raw_close_send(tree, parms);
return smbcli_request_simple_recv(req);
@ -843,7 +844,7 @@ struct smbcli_request *smb_raw_lock_send(struct smbcli_tree *tree, union smb_loc
/****************************************************************************
Locking calls - sync interface
****************************************************************************/
NTSTATUS smb_raw_lock(struct smbcli_tree *tree, union smb_lock *parms)
_PUBLIC_ NTSTATUS smb_raw_lock(struct smbcli_tree *tree, union smb_lock *parms)
{
struct smbcli_request *req = smb_raw_lock_send(tree, parms);
return smbcli_request_simple_recv(req);
@ -913,7 +914,7 @@ struct smbcli_request *smb_raw_flush_send(struct smbcli_tree *tree, union smb_fl
/****************************************************************************
flush a file - sync interface
****************************************************************************/
NTSTATUS smb_raw_flush(struct smbcli_tree *tree, union smb_flush *parms)
_PUBLIC_ NTSTATUS smb_raw_flush(struct smbcli_tree *tree, union smb_flush *parms)
{
struct smbcli_request *req = smb_raw_flush_send(tree, parms);
return smbcli_request_simple_recv(req);
@ -962,7 +963,7 @@ failed:
/*
seek a file - sync interface
*/
NTSTATUS smb_raw_seek(struct smbcli_tree *tree,
_PUBLIC_ NTSTATUS smb_raw_seek(struct smbcli_tree *tree,
union smb_seek *parms)
{
struct smbcli_request *req = smb_raw_seek_send(tree, parms);

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "param/param.h"
@ -711,7 +712,7 @@ NTSTATUS smb_raw_fileinfo_recv(struct smbcli_request *req,
/****************************************************************************
Query file info (sync interface)
****************************************************************************/
NTSTATUS smb_raw_fileinfo(struct smbcli_tree *tree,
_PUBLIC_ NTSTATUS smb_raw_fileinfo(struct smbcli_tree *tree,
TALLOC_CTX *mem_ctx,
union smb_fileinfo *parms)
{
@ -722,7 +723,7 @@ NTSTATUS smb_raw_fileinfo(struct smbcli_tree *tree,
/****************************************************************************
Query path info (async send)
****************************************************************************/
struct smbcli_request *smb_raw_pathinfo_send(struct smbcli_tree *tree,
_PUBLIC_ struct smbcli_request *smb_raw_pathinfo_send(struct smbcli_tree *tree,
union smb_fileinfo *parms)
{
DATA_BLOB data;
@ -756,7 +757,7 @@ struct smbcli_request *smb_raw_pathinfo_send(struct smbcli_tree *tree,
/****************************************************************************
Query path info (async recv)
****************************************************************************/
NTSTATUS smb_raw_pathinfo_recv(struct smbcli_request *req,
_PUBLIC_ NTSTATUS smb_raw_pathinfo_recv(struct smbcli_request *req,
TALLOC_CTX *mem_ctx,
union smb_fileinfo *parms)
{
@ -767,7 +768,7 @@ NTSTATUS smb_raw_pathinfo_recv(struct smbcli_request *req,
/****************************************************************************
Query path info (sync interface)
****************************************************************************/
NTSTATUS smb_raw_pathinfo(struct smbcli_tree *tree,
_PUBLIC_ NTSTATUS smb_raw_pathinfo(struct smbcli_tree *tree,
TALLOC_CTX *mem_ctx,
union smb_fileinfo *parms)
{

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "librpc/gen_ndr/ndr_misc.h"
/****************************************************************************
@ -326,7 +327,7 @@ failed:
/****************************************************************************
Query FSInfo raw interface (sync interface)
****************************************************************************/
NTSTATUS smb_raw_fsinfo(struct smbcli_tree *tree,
_PUBLIC_ NTSTATUS smb_raw_fsinfo(struct smbcli_tree *tree,
TALLOC_CTX *mem_ctx,
union smb_fsinfo *fsinfo)
{

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#define SETUP_REQUEST(cmd, wct, buflen) do { \
req = smbcli_request_setup(tree, cmd, wct, buflen); \
@ -163,7 +164,7 @@ NTSTATUS smb_raw_ioctl_recv(struct smbcli_request *req,
/*
send a raw ioctl - sync interface
*/
_PUBLIC_ NTSTATUS smb_raw_ioctl(struct smbcli_tree *tree,
NTSTATUS smb_raw_ioctl(struct smbcli_tree *tree,
TALLOC_CTX *mem_ctx, union smb_ioctl *parms)
{
struct smbcli_request *req;

View File

@ -22,6 +22,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "system/time.h"
#include "param/param.h"

View File

@ -19,12 +19,13 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "lib/util/dlinklist.h"
/****************************************************************************
change notify (async send)
****************************************************************************/
struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, union smb_notify *parms)
_PUBLIC_ struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, union smb_notify *parms)
{
struct smb_nttrans nt;
uint8_t setup[8];
@ -51,7 +52,7 @@ struct smbcli_request *smb_raw_changenotify_send(struct smbcli_tree *tree, union
/****************************************************************************
change notify (async recv)
****************************************************************************/
NTSTATUS smb_raw_changenotify_recv(struct smbcli_request *req,
_PUBLIC_ NTSTATUS smb_raw_changenotify_recv(struct smbcli_request *req,
TALLOC_CTX *mem_ctx, union smb_notify *parms)
{
struct smb_nttrans nt;

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#define SETUP_REQUEST(cmd, wct, buflen) do { \
req = smbcli_request_setup(tree, cmd, wct, buflen); \
@ -29,7 +30,7 @@
/****************************************************************************
low level read operation (async send)
****************************************************************************/
struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_read *parms)
_PUBLIC_ struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_read *parms)
{
bool bigoffset = false;
struct smbcli_request *req = NULL;
@ -115,7 +116,7 @@ struct smbcli_request *smb_raw_read_send(struct smbcli_tree *tree, union smb_rea
/****************************************************************************
low level read operation (async recv)
****************************************************************************/
NTSTATUS smb_raw_read_recv(struct smbcli_request *req, union smb_read *parms)
_PUBLIC_ NTSTATUS smb_raw_read_recv(struct smbcli_request *req, union smb_read *parms)
{
if (!smbcli_request_receive(req) ||
smbcli_request_is_error(req)) {
@ -197,7 +198,7 @@ failed:
/****************************************************************************
low level read operation (sync interface)
****************************************************************************/
NTSTATUS smb_raw_read(struct smbcli_tree *tree, union smb_read *parms)
_PUBLIC_ NTSTATUS smb_raw_read(struct smbcli_tree *tree, union smb_read *parms)
{
struct smbcli_request *req = smb_raw_read_send(tree, parms);
return smb_raw_read_recv(req, parms);
@ -207,7 +208,7 @@ NTSTATUS smb_raw_read(struct smbcli_tree *tree, union smb_read *parms)
/****************************************************************************
raw write interface (async send)
****************************************************************************/
struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_write *parms)
_PUBLIC_ struct smbcli_request *smb_raw_write_send(struct smbcli_tree *tree, union smb_write *parms)
{
bool bigoffset = false;
struct smbcli_request *req = NULL;
@ -341,7 +342,7 @@ failed:
/****************************************************************************
raw write interface (sync interface)
****************************************************************************/
NTSTATUS smb_raw_write(struct smbcli_tree *tree, union smb_write *parms)
_PUBLIC_ NTSTATUS smb_raw_write(struct smbcli_tree *tree, union smb_write *parms)
{
struct smbcli_request *req = smb_raw_write_send(tree, parms);
return smb_raw_write_recv(req, parms);

View File

@ -24,9 +24,12 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "lib/util/dlinklist.h"
#include "lib/events/events.h"
#include "param/param.h"
#include "librpc/ndr/libndr.h"
#include "librpc/gen_ndr/ndr_misc.h"
/* we over allocate the data buffer to prevent too many realloc calls */
#define REQ_OVER_ALLOCATION 0
@ -49,7 +52,7 @@ void smb_setup_bufinfo(struct smbcli_request *req)
/* destroy a request structure and return final status */
NTSTATUS smbcli_request_destroy(struct smbcli_request *req)
_PUBLIC_ NTSTATUS smbcli_request_destroy(struct smbcli_request *req)
{
NTSTATUS status;
@ -405,7 +408,7 @@ bool smbcli_handle_oplock_break(struct smbcli_transport *transport, uint_t len,
wait for a reply to be received for a packet that just returns an error
code and nothing more
*/
NTSTATUS smbcli_request_simple_recv(struct smbcli_request *req)
_PUBLIC_ NTSTATUS smbcli_request_simple_recv(struct smbcli_request *req)
{
(void) smbcli_request_receive(req);
return smbcli_request_destroy(req);

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
/****************************************************************************
Old style search backend - process output.
@ -718,7 +719,7 @@ static NTSTATUS smb_raw_t2search_backend(struct smbcli_tree *tree,
/* Implements trans2findfirst2 and old search
*/
NTSTATUS smb_raw_search_first(struct smbcli_tree *tree,
_PUBLIC_ NTSTATUS smb_raw_search_first(struct smbcli_tree *tree,
TALLOC_CTX *mem_ctx,
union smb_search_first *io, void *private,
smbcli_search_callback callback)

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "librpc/gen_ndr/ndr_security.h"
@ -409,7 +410,7 @@ struct smbcli_request *smb_raw_setfileinfo_send(struct smbcli_tree *tree,
/****************************************************************************
Set file info (async send)
****************************************************************************/
NTSTATUS smb_raw_setfileinfo(struct smbcli_tree *tree,
_PUBLIC_ NTSTATUS smb_raw_setfileinfo(struct smbcli_tree *tree,
union smb_setfileinfo *parms)
{
struct smbcli_request *req = smb_raw_setfileinfo_send(tree, parms);
@ -420,7 +421,7 @@ NTSTATUS smb_raw_setfileinfo(struct smbcli_tree *tree,
/****************************************************************************
Set path info (async send)
****************************************************************************/
struct smbcli_request *smb_raw_setpathinfo_send(struct smbcli_tree *tree,
_PUBLIC_ struct smbcli_request *smb_raw_setpathinfo_send(struct smbcli_tree *tree,
union smb_setfileinfo *parms)
{
DATA_BLOB blob;
@ -456,7 +457,7 @@ struct smbcli_request *smb_raw_setpathinfo_send(struct smbcli_tree *tree,
/****************************************************************************
Set path info (sync interface)
****************************************************************************/
NTSTATUS smb_raw_setpathinfo(struct smbcli_tree *tree,
_PUBLIC_ NTSTATUS smb_raw_setpathinfo(struct smbcli_tree *tree,
union smb_setfileinfo *parms)
{
struct smbcli_request *req = smb_raw_setpathinfo_send(tree, parms);

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/raw/ioctl.h"
/*

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "lib/util/dlinklist.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#define TORTURE_TRANS_DATA 0
@ -192,7 +193,7 @@ failed:
return smbcli_request_destroy(req);
}
NTSTATUS smb_raw_trans_recv(struct smbcli_request *req,
_PUBLIC_ NTSTATUS smb_raw_trans_recv(struct smbcli_request *req,
TALLOC_CTX *mem_ctx,
struct smb_trans2 *parms)
{
@ -365,7 +366,7 @@ struct smbcli_request *smb_raw_trans_send_backend(struct smbcli_tree *tree,
trans/trans2 raw async interface - only BLOBs used in this interface.
note that this doesn't yet support multi-part requests
*/
struct smbcli_request *smb_raw_trans_send(struct smbcli_tree *tree,
_PUBLIC_ struct smbcli_request *smb_raw_trans_send(struct smbcli_tree *tree,
struct smb_trans2 *parms)
{
return smb_raw_trans_send_backend(tree, parms, SMBtrans);
@ -394,7 +395,7 @@ NTSTATUS smb_raw_trans2(struct smbcli_tree *tree,
/*
trans synchronous blob interface
*/
NTSTATUS smb_raw_trans(struct smbcli_tree *tree,
_PUBLIC_ NTSTATUS smb_raw_trans(struct smbcli_tree *tree,
TALLOC_CTX *mem_ctx,
struct smb_trans2 *parms)
{
@ -631,7 +632,7 @@ NTSTATUS smb_raw_nttrans(struct smbcli_tree *tree,
TODO: we only need to avoid multi-part replies because the
multi-part trans receive code is broken.
*/
size_t smb_raw_max_trans_data(struct smbcli_tree *tree, size_t param_size)
_PUBLIC_ size_t smb_raw_max_trans_data(struct smbcli_tree *tree, size_t param_size)
{
return tree->session->transport->negotiate.max_xmit - (70 + param_size);
}

View File

@ -22,6 +22,7 @@
#include "includes.h"
#include "smb.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "lib/crypto/crypto.h"
#include "param/param.h"

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
#include "libcli/composite/composite.h"

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"

View File

@ -21,8 +21,10 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
#include "librpc/ndr/libndr.h"
/*
send a negprot request

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/raw/raw_proto.h"
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
#include "lib/socket/socket.h"

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