s3-auth rename auth_ntlmssp_prepare() -> auth_generic_prepare()
authorAndrew Bartlett <abartlet@samba.org>
Fri, 16 Dec 2011 05:08:56 +0000 (16:08 +1100)
committerStefan Metzmacher <metze@samba.org>
Thu, 22 Dec 2011 18:25:10 +0000 (19:25 +0100)
This function handles more than NTLMSSP now, at least when we are an AD DC
and so changing the name may avoid some confusion in the future.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/auth/auth_ntlmssp.c
source3/auth/proto.h
source3/rpc_server/dcesrv_ntlmssp.c
source3/smbd/negprot.c
source3/smbd/seal.c
source3/smbd/sesssetup.c
source3/smbd/smb2_sesssetup.c

index 082f10cf8c9991c530e280bade5490de1a7ef7f2..0f09ae10211d2e8bbe5d46819c98f64a6ec07ff5 100644 (file)
@@ -210,7 +210,7 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state,
        return nt_status;
 }
 
-NTSTATUS auth_ntlmssp_prepare(const struct tsocket_address *remote_address,
+NTSTATUS auth_generic_prepare(const struct tsocket_address *remote_address,
                              struct auth_generic_state **auth_ntlmssp_state)
 {
        struct auth_context *auth_context;
@@ -414,7 +414,7 @@ NTSTATUS auth_generic_authtype_start(struct auth_generic_state *auth_ntlmssp_sta
 
        if (auth_type != DCERPC_AUTH_TYPE_NTLMSSP) {
                /* The caller will then free the auth_ntlmssp_state,
-                * undoing what was done in auth_ntlmssp_prepare().
+                * undoing what was done in auth_generic_prepare().
                 *
                 * We can't do that logic here, as
                 * auth_ntlmssp_want_feature() may have been called in
index b608c48e6e469cf88a4ae6110103ad0bf2c5917d..125ac14ea4a294317b5e11eedf31683c926816de 100644 (file)
@@ -69,7 +69,7 @@ NTSTATUS auth_netlogond_init(void);
 
 /* The following definitions come from auth/auth_ntlmssp.c  */
 
-NTSTATUS auth_ntlmssp_prepare(const struct tsocket_address *remote_address,
+NTSTATUS auth_generic_prepare(const struct tsocket_address *remote_address,
                              struct auth_generic_state **auth_ntlmssp_state);
 NTSTATUS auth_ntlmssp_start(struct auth_generic_state *auth_ntlmssp_state);
 NTSTATUS auth_generic_start(struct auth_generic_state *auth_ntlmssp_state, const char *oid);
index 7ec174c6934781eb8da82d887d0df1fb47adb200..9a471506a87043f4399e3685cbd92c27ed785797 100644 (file)
@@ -38,9 +38,9 @@ NTSTATUS ntlmssp_server_auth_start(TALLOC_CTX *mem_ctx,
        struct auth_generic_state *a = NULL;
        NTSTATUS status;
 
-       status = auth_ntlmssp_prepare(remote_address, &a);
+       status = auth_generic_prepare(remote_address, &a);
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0, (__location__ ": auth_ntlmssp_prepare failed: %s\n",
+               DEBUG(0, (__location__ ": auth_generic_prepare failed: %s\n",
                          nt_errstr(status)));
                return status;
        }
index f7d277be3a8b8e861bb911199d9442de0544f1db..2076b094a3df231bdb4daac6c7c5314d6d6495d2 100644 (file)
@@ -204,7 +204,7 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn)
        sconn->use_gensec_hook = false;
 
        /* See if we can get an SPNEGO blob out of the gensec hook (if auth_samba4 is loaded) */
-       status = auth_ntlmssp_prepare(sconn->remote_address,
+       status = auth_generic_prepare(sconn->remote_address,
                                      &auth_ntlmssp_state);
        if (NT_STATUS_IS_OK(status)) {
                status = auth_generic_start(auth_ntlmssp_state, GENSEC_OID_SPNEGO);
index ab87d76b26dfd69f1f887e4b263a256ccdc52593..fc811deb3c1d011bab36fe5fc40495372111c18a 100644 (file)
@@ -80,7 +80,7 @@ static NTSTATUS make_auth_ntlmssp(const struct tsocket_address *remote_address,
                                  struct smb_trans_enc_state *es)
 {
        struct auth_generic_state *auth_ntlmssp_state;
-       NTSTATUS status = auth_ntlmssp_prepare(remote_address,
+       NTSTATUS status = auth_generic_prepare(remote_address,
                                               &auth_ntlmssp_state);
        if (!NT_STATUS_IS_OK(status)) {
                return nt_status_squash(status);
index 43ff13ec2872fd47fc587b1705bdf2261375ddd9..b7daa9e4f0988aee9daac047c901483f2115a7c4 100644 (file)
@@ -625,7 +625,7 @@ static void reply_spnego_negotiate(struct smb_request *req,
                return;
        }
 
-       status = auth_ntlmssp_prepare(sconn->remote_address,
+       status = auth_generic_prepare(sconn->remote_address,
                                      auth_ntlmssp_state);
        if (!NT_STATUS_IS_OK(status)) {
                /* Kill the intermediate vuid */
@@ -737,7 +737,7 @@ static void reply_spnego_auth(struct smb_request *req,
        data_blob_free(&secblob);
 
        if (!*auth_ntlmssp_state) {
-               status = auth_ntlmssp_prepare(sconn->remote_address,
+               status = auth_generic_prepare(sconn->remote_address,
                                              auth_ntlmssp_state);
                if (!NT_STATUS_IS_OK(status)) {
                        /* Kill the intermediate vuid */
@@ -1145,7 +1145,7 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
                DATA_BLOB chal;
 
                if (!vuser->auth_ntlmssp_state) {
-                       status = auth_ntlmssp_prepare(sconn->remote_address,
+                       status = auth_generic_prepare(sconn->remote_address,
                                                      &vuser->auth_ntlmssp_state);
                        if (!NT_STATUS_IS_OK(status)) {
                                /* Kill the intermediate vuid */
index f2ce989eb60fb392cdad321b6c14d49cec8f2be6..a6ff31b5bf9dd476e648d4f36fd133dbfbd8f8d8 100644 (file)
@@ -375,7 +375,7 @@ static NTSTATUS smbd_smb2_spnego_negotiate(struct smbd_smb2_session *session,
                status = NT_STATUS_MORE_PROCESSING_REQUIRED;
        } else {
                /* Fall back to NTLMSSP. */
-               status = auth_ntlmssp_prepare(session->sconn->remote_address,
+               status = auth_generic_prepare(session->sconn->remote_address,
                                            &session->auth_ntlmssp_state);
                if (!NT_STATUS_IS_OK(status)) {
                        goto out;
@@ -564,7 +564,7 @@ static NTSTATUS smbd_smb2_spnego_auth(struct smbd_smb2_session *session,
        }
 
        if (session->auth_ntlmssp_state == NULL) {
-               status = auth_ntlmssp_prepare(session->sconn->remote_address,
+               status = auth_generic_prepare(session->sconn->remote_address,
                                            &session->auth_ntlmssp_state);
                if (!NT_STATUS_IS_OK(status)) {
                        data_blob_free(&auth);
@@ -641,7 +641,7 @@ static NTSTATUS smbd_smb2_raw_ntlmssp_auth(struct smbd_smb2_session *session,
        *out_security_buffer = data_blob_null;
 
        if (session->auth_ntlmssp_state == NULL) {
-               status = auth_ntlmssp_prepare(session->sconn->remote_address,
+               status = auth_generic_prepare(session->sconn->remote_address,
                                            &session->auth_ntlmssp_state);
                if (!NT_STATUS_IS_OK(status)) {
                        TALLOC_FREE(session);