summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/auth/auth_builtin.c6
-rw-r--r--source3/auth/auth_compat.c6
-rw-r--r--source3/auth/auth_domain.c6
-rw-r--r--source3/auth/auth_netlogond.c2
-rw-r--r--source3/auth/auth_sam.c4
-rw-r--r--source3/auth/auth_script.c2
-rw-r--r--source3/auth/auth_server.c2
-rw-r--r--source3/auth/auth_unix.c2
-rw-r--r--source3/auth/auth_util.c36
-rw-r--r--source3/auth/auth_wbc.c2
-rw-r--r--source3/auth/auth_winbind.c2
-rw-r--r--source3/include/auth.h6
-rw-r--r--source3/include/proto.h16
-rw-r--r--source3/rpc_server/srv_netlog_nt.c2
-rw-r--r--source3/smbd/lanman.c2
-rw-r--r--source3/smbd/password.c2
-rw-r--r--source3/smbd/sesssetup.c8
17 files changed, 55 insertions, 51 deletions
diff --git a/source3/auth/auth_builtin.c b/source3/auth/auth_builtin.c
index dbd7937e37..f8f048a6f2 100644
--- a/source3/auth/auth_builtin.c
+++ b/source3/auth/auth_builtin.c
@@ -35,7 +35,7 @@ static NTSTATUS check_guest_security(const struct auth_context *auth_context,
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
/* mark this as 'not for me' */
NTSTATUS nt_status = NT_STATUS_NOT_IMPLEMENTED;
@@ -78,7 +78,7 @@ static NTSTATUS check_name_to_ntstatus_security(const struct auth_context *auth_
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
NTSTATUS nt_status;
fstring user;
@@ -131,7 +131,7 @@ static NTSTATUS check_fixed_challenge_security(const struct auth_context *auth_c
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
return NT_STATUS_NOT_IMPLEMENTED;
}
diff --git a/source3/auth/auth_compat.c b/source3/auth/auth_compat.c
index dc046d5c0d..e90036f3ff 100644
--- a/source3/auth/auth_compat.c
+++ b/source3/auth/auth_compat.c
@@ -35,7 +35,9 @@ SMB hash
return True if the password is correct, False otherwise
****************************************************************************/
-NTSTATUS check_plaintext_password(const char *smb_name, DATA_BLOB plaintext_password, auth_serversupplied_info **server_info)
+NTSTATUS check_plaintext_password(const char *smb_name,
+ DATA_BLOB plaintext_password,
+ struct auth_serversupplied_info **server_info)
{
struct auth_context *plaintext_auth_context = NULL;
struct auth_usersupplied_info *user_info = NULL;
@@ -72,7 +74,7 @@ static NTSTATUS pass_check_smb(struct auth_context *actx,
{
NTSTATUS nt_status;
- auth_serversupplied_info *server_info = NULL;
+ struct auth_serversupplied_info *server_info = NULL;
if (encrypted) {
struct auth_usersupplied_info *user_info = NULL;
if (actx == NULL) {
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index bbe0ba5d40..a07aa617c4 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -254,7 +254,7 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
const char *domain,
uchar chal[8],
- auth_serversupplied_info **server_info,
+ struct auth_serversupplied_info **server_info,
const char *dc_name,
struct sockaddr_storage *dc_ss)
@@ -373,7 +373,7 @@ static NTSTATUS check_ntdomain_security(const struct auth_context *auth_context,
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
const char *domain = lp_workgroup();
@@ -442,7 +442,7 @@ static NTSTATUS check_trustdomain_security(const struct auth_context *auth_conte
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
unsigned char trust_md4_password[16];
diff --git a/source3/auth/auth_netlogond.c b/source3/auth/auth_netlogond.c
index f3b66e4948..bfd12281c4 100644
--- a/source3/auth/auth_netlogond.c
+++ b/source3/auth/auth_netlogond.c
@@ -154,7 +154,7 @@ static NTSTATUS check_netlogond_security(const struct auth_context *auth_context
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
TALLOC_CTX *frame = talloc_stackframe();
struct netr_SamInfo3 *info3 = NULL;
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 01f82517d6..834ca977da 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -360,7 +360,7 @@ static NTSTATUS check_sam_security(const struct auth_context *auth_context,
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
struct samu *sampass=NULL;
bool ret;
@@ -533,7 +533,7 @@ static NTSTATUS check_samstrict_security(const struct auth_context *auth_context
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
bool is_local_name, is_my_domain;
diff --git a/source3/auth/auth_script.c b/source3/auth/auth_script.c
index 353f3be78f..be1ae81501 100644
--- a/source3/auth/auth_script.c
+++ b/source3/auth/auth_script.c
@@ -41,7 +41,7 @@ static NTSTATUS script_check_user_credentials(const struct auth_context *auth_co
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
const char *script = lp_parm_const_string( GLOBAL_SECTION_SNUM, "auth_script", "script", NULL);
char *secret_str;
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index 3f0ab9dc72..ec92787dce 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -271,7 +271,7 @@ static NTSTATUS check_smbserver_security(const struct auth_context *auth_context
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
struct server_security_state *state = talloc_get_type_abort(
my_private_data, struct server_security_state);
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c
index 6f2f9f10a9..3e2df9a123 100644
--- a/source3/auth/auth_unix.c
+++ b/source3/auth/auth_unix.c
@@ -86,7 +86,7 @@ static NTSTATUS check_unix_security(const struct auth_context *auth_context,
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
NTSTATUS nt_status;
struct passwd *pass = NULL;
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index eebc21b93c..9db358d965 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -33,7 +33,7 @@
auth_serversupplied_info struct.
****************************************************************************/
-static void sort_sid_array_for_smbd(auth_serversupplied_info *result,
+static void sort_sid_array_for_smbd(struct auth_serversupplied_info *result,
const DOM_SID *pgroup_sid)
{
unsigned int i;
@@ -494,7 +494,7 @@ bool make_user_info_guest(struct auth_usersupplied_info **user_info)
return NT_STATUS_IS_OK(nt_status) ? True : False;
}
-static int server_info_dtor(auth_serversupplied_info *server_info)
+static int server_info_dtor(struct auth_serversupplied_info *server_info)
{
TALLOC_FREE(server_info->sam_account);
ZERO_STRUCTP(server_info);
@@ -505,11 +505,11 @@ static int server_info_dtor(auth_serversupplied_info *server_info)
Make a server_info struct. Free with TALLOC_FREE().
***************************************************************************/
-static auth_serversupplied_info *make_server_info(TALLOC_CTX *mem_ctx)
+static struct auth_serversupplied_info *make_server_info(TALLOC_CTX *mem_ctx)
{
struct auth_serversupplied_info *result;
- result = TALLOC_ZERO_P(mem_ctx, auth_serversupplied_info);
+ result = TALLOC_ZERO_P(mem_ctx, struct auth_serversupplied_info);
if (result == NULL) {
DEBUG(0, ("talloc failed\n"));
return NULL;
@@ -562,12 +562,12 @@ static bool is_our_machine_account(const char *username)
Make (and fill) a user_info struct from a struct samu
***************************************************************************/
-NTSTATUS make_server_info_sam(auth_serversupplied_info **server_info,
+NTSTATUS make_server_info_sam(struct auth_serversupplied_info **server_info,
struct samu *sampass)
{
struct passwd *pwd;
gid_t *gids;
- auth_serversupplied_info *result;
+ struct auth_serversupplied_info *result;
const char *username = pdb_get_username(sampass);
NTSTATUS status;
@@ -701,7 +701,7 @@ static NTSTATUS log_nt_token(NT_USER_TOKEN *token)
* server_info->sids (the info3/sam groups). Find the unix gids.
*/
-NTSTATUS create_local_token(auth_serversupplied_info *server_info)
+NTSTATUS create_local_token(struct auth_serversupplied_info *server_info)
{
NTSTATUS status;
size_t i;
@@ -1140,7 +1140,7 @@ bool user_in_group(const char *username, const char *groupname)
to a struct samu
***************************************************************************/
-NTSTATUS make_server_info_pw(auth_serversupplied_info **server_info,
+NTSTATUS make_server_info_pw(struct auth_serversupplied_info **server_info,
char *unix_username,
struct passwd *pwd)
{
@@ -1151,7 +1151,7 @@ NTSTATUS make_server_info_pw(auth_serversupplied_info **server_info,
TALLOC_CTX *mem_ctx = NULL;
DOM_SID u_sid;
enum lsa_SidType type;
- auth_serversupplied_info *result;
+ struct auth_serversupplied_info *result;
if ( !(sampass = samu_new( NULL )) ) {
return NT_STATUS_NO_MEMORY;
@@ -1261,7 +1261,7 @@ NTSTATUS make_server_info_pw(auth_serversupplied_info **server_info,
the guest gid, then create one.
***************************************************************************/
-static NTSTATUS make_new_server_info_guest(auth_serversupplied_info **server_info)
+static NTSTATUS make_new_server_info_guest(struct auth_serversupplied_info **server_info)
{
NTSTATUS status;
struct samu *sampass = NULL;
@@ -1355,9 +1355,9 @@ NTSTATUS make_serverinfo_from_username(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
- const auth_serversupplied_info *src)
+ const struct auth_serversupplied_info *src)
{
- auth_serversupplied_info *dst;
+ struct auth_serversupplied_info *dst;
dst = make_server_info(mem_ctx);
if (dst == NULL) {
@@ -1433,7 +1433,7 @@ bool server_info_set_session_key(struct auth_serversupplied_info *info,
return (info->user_session_key.data != NULL);
}
-static auth_serversupplied_info *guest_info = NULL;
+static struct auth_serversupplied_info *guest_info = NULL;
bool init_guest_info(void)
{
@@ -1444,7 +1444,7 @@ bool init_guest_info(void)
}
NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
*server_info = copy_serverinfo(mem_ctx, guest_info);
return (*server_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY;
@@ -1620,7 +1620,7 @@ struct passwd *smb_getpwnam( TALLOC_CTX *mem_ctx, char *domuser,
NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
const char *sent_nt_username,
const char *domain,
- auth_serversupplied_info **server_info,
+ struct auth_serversupplied_info **server_info,
struct netr_SamInfo3 *info3)
{
char zeros[16];
@@ -1637,7 +1637,7 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
uid_t uid = (uid_t)-1;
gid_t gid = (gid_t)-1;
- auth_serversupplied_info *result;
+ struct auth_serversupplied_info *result;
/*
Here is where we should check the list of
@@ -1873,7 +1873,7 @@ NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
const char *sent_nt_username,
const char *domain,
const struct wbcAuthUserInfo *info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
char zeros[16];
@@ -1890,7 +1890,7 @@ NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
uid_t uid = (uid_t)-1;
gid_t gid = (gid_t)-1;
- auth_serversupplied_info *result;
+ struct auth_serversupplied_info *result;
result = make_server_info(NULL);
if (result == NULL) {
diff --git a/source3/auth/auth_wbc.c b/source3/auth/auth_wbc.c
index d86ea49c89..85b05efb36 100644
--- a/source3/auth/auth_wbc.c
+++ b/source3/auth/auth_wbc.c
@@ -48,7 +48,7 @@ static NTSTATUS check_wbc_security(const struct auth_context *auth_context,
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
NTSTATUS nt_status;
wbcErr wbc_status;
diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c
index 01f60f8df7..74723e6af4 100644
--- a/source3/auth/auth_winbind.c
+++ b/source3/auth/auth_winbind.c
@@ -31,7 +31,7 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context,
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info)
+ struct auth_serversupplied_info **server_info)
{
NTSTATUS nt_status;
wbcErr wbc_status;
diff --git a/source3/include/auth.h b/source3/include/auth.h
index 4d5c2cd850..115143fb73 100644
--- a/source3/include/auth.h
+++ b/source3/include/auth.h
@@ -40,7 +40,7 @@ struct auth_usersupplied_info {
};
-typedef struct auth_serversupplied_info {
+struct auth_serversupplied_info {
bool guest;
DOM_SID *sids; /* These SIDs are preliminary between
@@ -77,7 +77,7 @@ typedef struct auth_serversupplied_info {
* smb request. See set_current_user_info.
*/
char *sanitized_username;
-} auth_serversupplied_info;
+};
struct auth_context {
DATA_BLOB challenge;
@@ -110,7 +110,7 @@ typedef struct auth_methods
void *my_private_data,
TALLOC_CTX *mem_ctx,
const struct auth_usersupplied_info *user_info,
- auth_serversupplied_info **server_info);
+ struct auth_serversupplied_info **server_info);
/* If you are using this interface, then you are probably
* getting something wrong. This interface is only for
diff --git a/source3/include/proto.h b/source3/include/proto.h
index e39f359ed1..ce14feb8eb 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -38,7 +38,9 @@ NTSTATUS auth_builtin_init(void);
/* The following definitions come from auth/auth_compat.c */
-NTSTATUS check_plaintext_password(const char *smb_name, DATA_BLOB plaintext_password, auth_serversupplied_info **server_info);
+NTSTATUS check_plaintext_password(const char *smb_name,
+ DATA_BLOB plaintext_password,
+ struct auth_serversupplied_info **server_info);
bool password_ok(struct auth_context *actx, bool global_encrypted,
const char *session_workgroup,
const char *smb_name, DATA_BLOB password_blob);
@@ -117,7 +119,7 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
struct nt_user_token **token);
bool user_in_group_sid(const char *username, const DOM_SID *group_sid);
bool user_in_group(const char *username, const char *groupname);
-NTSTATUS make_server_info_pw(auth_serversupplied_info **server_info,
+NTSTATUS make_server_info_pw(struct auth_serversupplied_info **server_info,
char *unix_username,
struct passwd *pwd);
NTSTATUS make_serverinfo_from_username(TALLOC_CTX *mem_ctx,
@@ -125,25 +127,25 @@ NTSTATUS make_serverinfo_from_username(TALLOC_CTX *mem_ctx,
bool is_guest,
struct auth_serversupplied_info **presult);
struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
- const auth_serversupplied_info *src);
+ const struct auth_serversupplied_info *src);
bool init_guest_info(void);
bool server_info_set_session_key(struct auth_serversupplied_info *info,
DATA_BLOB session_key);
NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
- auth_serversupplied_info **server_info);
+ struct auth_serversupplied_info **server_info);
bool copy_current_user(struct current_user *dst, struct current_user *src);
struct passwd *smb_getpwnam( TALLOC_CTX *mem_ctx, char *domuser,
fstring save_username, bool create );
NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
const char *sent_nt_username,
const char *domain,
- auth_serversupplied_info **server_info,
+ struct auth_serversupplied_info **server_info,
struct netr_SamInfo3 *info3);
NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
const char *sent_nt_username,
const char *domain,
const struct wbcAuthUserInfo *info,
- auth_serversupplied_info **server_info);
+ struct auth_serversupplied_info **server_info);
void free_user_info(struct auth_usersupplied_info **user_info);
bool make_auth_methods(struct auth_context *auth_context, auth_methods **auth_method) ;
bool is_trusted_domain(const char* dom_name);
@@ -6716,7 +6718,7 @@ void invalidate_all_vuids(struct smbd_server_connection *sconn);
int register_initial_vuid(struct smbd_server_connection *sconn);
int register_existing_vuid(struct smbd_server_connection *sconn,
uint16 vuid,
- auth_serversupplied_info *server_info,
+ struct auth_serversupplied_info *server_info,
DATA_BLOB response_blob,
const char *smb_name);
void add_session_user(struct smbd_server_connection *sconn, const char *user);
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index 3c099518b8..66f3bd3130 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -1058,7 +1058,7 @@ static NTSTATUS _netr_LogonSamLogon_base(pipes_struct *p,
union netr_LogonLevel *logon = r->in.logon;
const char *nt_username, *nt_domain, *nt_workstation;
struct auth_usersupplied_info *user_info = NULL;
- auth_serversupplied_info *server_info = NULL;
+ struct auth_serversupplied_info *server_info = NULL;
struct auth_context *auth_context = NULL;
uint8_t pipe_session_key[16];
bool process_creds = true;
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 7ee6c9b59c..029429932e 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -2616,7 +2616,7 @@ static bool api_SetUserPassword(connection_struct *conn,uint16 vuid,
*/
{
- auth_serversupplied_info *server_info = NULL;
+ struct auth_serversupplied_info *server_info = NULL;
DATA_BLOB password = data_blob(pass1, strlen(pass1)+1);
if (NT_STATUS_IS_OK(check_plaintext_password(user,password,&server_info))) {
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 755ff5d6cd..2e63f7a395 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -248,7 +248,7 @@ static int register_homes_share(const char *username)
int register_existing_vuid(struct smbd_server_connection *sconn,
uint16 vuid,
- auth_serversupplied_info *server_info,
+ struct auth_serversupplied_info *server_info,
DATA_BLOB response_blob,
const char *smb_name)
{
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 598daa0582..ae99127db2 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -41,7 +41,7 @@ struct pending_auth_data {
is set approriately
*/
static NTSTATUS do_map_to_guest(NTSTATUS status,
- auth_serversupplied_info **server_info,
+ struct auth_serversupplied_info **server_info,
const char *user, const char *domain)
{
if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) {
@@ -128,7 +128,7 @@ static void reply_sesssetup_blob(struct smb_request *req,
Do a 'guest' logon, getting back the
****************************************************************************/
-static NTSTATUS check_guest_password(auth_serversupplied_info **server_info)
+static NTSTATUS check_guest_password(struct auth_serversupplied_info **server_info)
{
struct auth_context *auth_context;
struct auth_usersupplied_info *user_info = NULL;
@@ -244,7 +244,7 @@ static void reply_spnego_kerberos(struct smb_request *req,
NTSTATUS ret = NT_STATUS_OK;
struct PAC_DATA *pac_data = NULL;
DATA_BLOB ap_rep, ap_rep_wrapped, response;
- auth_serversupplied_info *server_info = NULL;
+ struct auth_serversupplied_info *server_info = NULL;
DATA_BLOB session_key = data_blob_null;
uint8 tok_id[2];
DATA_BLOB nullblob = data_blob_null;
@@ -1389,7 +1389,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
const char *native_lanman;
const char *primary_domain;
struct auth_usersupplied_info *user_info = NULL;
- auth_serversupplied_info *server_info = NULL;
+ struct auth_serversupplied_info *server_info = NULL;
uint16 smb_flag2 = req->flags2;
NTSTATUS nt_status;