summaryrefslogtreecommitdiff
path: root/libcli/smb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-01-14 12:00:53 +1100
committerStefan Metzmacher <metze@samba.org>2012-01-20 23:55:55 +0100
commit41ed715d42434c5eba2fc4cd9fe267c5179330da (patch)
treea11c540c6cf58cffdd2e6d7438541f5dd260155d /libcli/smb
parent06f7105490ecd387f726d540b33c8eba960e9cfb (diff)
downloadsamba-41ed715d42434c5eba2fc4cd9fe267c5179330da.tar.gz
samba-41ed715d42434c5eba2fc4cd9fe267c5179330da.tar.bz2
samba-41ed715d42434c5eba2fc4cd9fe267c5179330da.zip
s3-libsmb: use struct gensec_security directly
This is rather than via a now one-element union. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'libcli/smb')
-rw-r--r--libcli/smb/smb_seal.c8
-rw-r--r--libcli/smb/smb_seal.h4
2 files changed, 5 insertions, 7 deletions
diff --git a/libcli/smb/smb_seal.c b/libcli/smb/smb_seal.c
index 669b69ae00..a56dc6092e 100644
--- a/libcli/smb/smb_seal.c
+++ b/libcli/smb/smb_seal.c
@@ -180,7 +180,7 @@ NTSTATUS common_encrypt_buffer(struct smb_trans_enc_state *es, char *buffer, cha
return NT_STATUS_OK;
}
- return common_gensec_encrypt_buffer(es->s.gensec_security, es->enc_ctx_num, buffer, buf_out);
+ return common_gensec_encrypt_buffer(es->gensec_security, es->enc_ctx_num, buffer, buf_out);
}
/******************************************************************************
@@ -196,7 +196,7 @@ NTSTATUS common_decrypt_buffer(struct smb_trans_enc_state *es, char *buf)
return NT_STATUS_OK;
}
- return common_gensec_decrypt_buffer(es->s.gensec_security, buf);
+ return common_gensec_decrypt_buffer(es->gensec_security, buf);
}
/******************************************************************************
@@ -211,8 +211,8 @@ void common_free_encryption_state(struct smb_trans_enc_state **pp_es)
return;
}
- if (es->s.gensec_security) {
- TALLOC_FREE(es->s.gensec_security);
+ if (es->gensec_security) {
+ TALLOC_FREE(es->gensec_security);
}
SAFE_FREE(es);
*pp_es = NULL;
diff --git a/libcli/smb/smb_seal.h b/libcli/smb/smb_seal.h
index 724b25ef5e..937d0484e6 100644
--- a/libcli/smb/smb_seal.h
+++ b/libcli/smb/smb_seal.h
@@ -47,9 +47,7 @@ struct smb_trans_enc_state {
enum smb_trans_enc_type smb_enc_type;
uint16_t enc_ctx_num;
bool enc_on;
- union {
- struct gensec_security *gensec_security;
- } s;
+ struct gensec_security *gensec_security;
};
/* The following definitions come from smb_seal.c */