s3: Remove the typedef for "auth_serversupplied_info"
authorVolker Lendecke <vl@samba.org>
Sun, 10 Jan 2010 13:24:22 +0000 (14:24 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 10 Jan 2010 19:56:16 +0000 (20:56 +0100)
17 files changed:
source3/auth/auth_builtin.c
source3/auth/auth_compat.c
source3/auth/auth_domain.c
source3/auth/auth_netlogond.c
source3/auth/auth_sam.c
source3/auth/auth_script.c
source3/auth/auth_server.c
source3/auth/auth_unix.c
source3/auth/auth_util.c
source3/auth/auth_wbc.c
source3/auth/auth_winbind.c
source3/include/auth.h
source3/include/proto.h
source3/rpc_server/srv_netlog_nt.c
source3/smbd/lanman.c
source3/smbd/password.c
source3/smbd/sesssetup.c

index dbd7937e376ae65672f2d60e45ed4e4d3998ebd6..f8f048a6f2b7b55394467bdee2dd0a6905d43eaa 100644 (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;
 }
index dc046d5c0d54c71d3706017041b8c2abbe08c519..e90036f3ff95d4604b955c90777bea694f8227d3 100644 (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) {
index bbe0ba5d408879a62b4e5a72daa8e6c680ca5ed3..a07aa617c4dfdff18e4d6bc5c2bfd5ed74d984cf 100644 (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];
index f3b66e49487169c6ec0d0cc164a699b174283c13..bfd12281c4d0a122a578ac9e2f93815f9e7ad99a 100644 (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;
index 01f82517d66450030781057c9d09a99620f6707b..834ca977dac581f0e1d7cfc9df7cc8462a5b6549 100644 (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;
 
index 353f3be78fe2d140cb553fa6b800e97bea217740..be1ae815016dd84040014b7d355f5587fabab84f 100644 (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;
index 3f0ab9dc729bec465b229036a72fd29a7eb3c5d9..ec92787dceaccde64db981f68acb7a4b04501454 100644 (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);
index 6f2f9f10a97346d2af918d51d15a0118279d9303..3e2df9a123c934e1cff38ae9a6f707c0a0cc1c2d 100644 (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;
index eebc21b93c749571f29ac4514f38aad02be988b9..9db358d9659ee054eaff3bf571ba2087e189995e 100644 (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) {
index d86ea49c8956b769834884bb78a2a3b1bf62c8f8..85b05efb36785e6f800b1a6f6870b3dc3e21ae80 100644 (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;
index 01f60f8df772df0dd8e37cb8aebbe89b27faa2e9..74723e6af452e2e271c415d58a29f3117abb4e3a 100644 (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;
index 4d5c2cd850b5f37e4cc2b535d218ce6396943f7e..115143fb73d6b057a773965c2b7094c99f168019 100644 (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
index e39f359ed1a88ee7b641478c955bea7386c6a50d..ce14feb8eb20d34bd093dbb132bff8b225511b84 100644 (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);
index 3c099518b853d91f9177717767f3fc5f6b332d8c..66f3bd31304f4eb70b251b095c14ba8b3e13044b 100644 (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;
index 7ee6c9b59c377763f3010112ac9cfa458ba977ff..029429932ed74250ea6e6a03a3d5de1dd5fa2883 100644 (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))) {
index 755ff5d6cdeca1ce9a86a2aca6c8967566eb6893..2e63f7a39589ba4df7807f9f699b128fdfb85c85 100644 (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)
 {
index 598daa0582b13fb61f3b7d266aefd4a540976526..ae99127db2cad034d8c89982ffb2f8cc3a4913dc 100644 (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;