1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

s3: Remove the typedef for "auth_serversupplied_info"

This commit is contained in:
Volker Lendecke 2010-01-10 14:24:22 +01:00
parent 9bb4766bba
commit 081573091b
17 changed files with 55 additions and 51 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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