summaryrefslogtreecommitdiff
path: root/source4/kdc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-31 23:43:43 +0100
committerStefan Metzmacher <metze@samba.org>2009-02-01 00:17:19 +0100
commit15239f742cfcebe0bce4dbf4cb74eb2e8dcab364 (patch)
treeaf77939b30f4d446445389d5217945e9f98dfc10 /source4/kdc
parent06a24497dc167853bbd2171e50945595a62c5623 (diff)
downloadsamba-15239f742cfcebe0bce4dbf4cb74eb2e8dcab364.tar.gz
samba-15239f742cfcebe0bce4dbf4cb74eb2e8dcab364.tar.bz2
samba-15239f742cfcebe0bce4dbf4cb74eb2e8dcab364.zip
s4:kdc: avoid c++ reserved word 'private'
metze
Diffstat (limited to 'source4/kdc')
-rw-r--r--source4/kdc/hdb-samba4.c52
-rw-r--r--source4/kdc/kdc.c13
-rw-r--r--source4/kdc/pac-glue.c34
3 files changed, 50 insertions, 49 deletions
diff --git a/source4/kdc/hdb-samba4.c b/source4/kdc/hdb-samba4.c
index 937839d67d..daeed77975 100644
--- a/source4/kdc/hdb-samba4.c
+++ b/source4/kdc/hdb-samba4.c
@@ -186,9 +186,9 @@ static HDBFlags uf2HDBFlags(krb5_context context, int userAccountControl, enum h
return flags;
}
-static int hdb_ldb_destructor(struct hdb_ldb_private *private)
+static int hdb_ldb_destructor(struct hdb_ldb_private *p)
{
- hdb_entry_ex *entry_ex = private->entry_ex;
+ hdb_entry_ex *entry_ex = p->entry_ex;
free_hdb_entry(&entry_ex->entry);
return 0;
}
@@ -509,7 +509,7 @@ static krb5_error_code LDB_message2entry(krb5_context context, HDB *db,
"nCName",
ldb_dn_new(mem_ctx, (struct ldb_context *)db->hdb_db, NULL));
- struct hdb_ldb_private *private;
+ struct hdb_ldb_private *p;
NTTIME acct_expiry;
struct ldb_message_element *objectclasses;
@@ -531,19 +531,19 @@ static krb5_error_code LDB_message2entry(krb5_context context, HDB *db,
goto out;
}
- private = talloc(mem_ctx, struct hdb_ldb_private);
- if (!private) {
+ p = talloc(mem_ctx, struct hdb_ldb_private);
+ if (!p) {
ret = ENOMEM;
goto out;
}
- private->entry_ex = entry_ex;
- private->iconv_convenience = lp_iconv_convenience(lp_ctx);
- private->netbios_name = lp_netbios_name(lp_ctx);
+ p->entry_ex = entry_ex;
+ p->iconv_convenience = lp_iconv_convenience(lp_ctx);
+ p->netbios_name = lp_netbios_name(lp_ctx);
- talloc_set_destructor(private, hdb_ldb_destructor);
+ talloc_set_destructor(p, hdb_ldb_destructor);
- entry_ex->ctx = private;
+ entry_ex->ctx = p;
entry_ex->free_entry = hdb_ldb_free_entry;
userAccountControl = ldb_msg_find_attr_as_uint(msg, "userAccountControl", 0);
@@ -655,7 +655,7 @@ static krb5_error_code LDB_message2entry(krb5_context context, HDB *db,
entry_ex->entry.generation = NULL;
/* Get keys from the db */
- ret = LDB_message2entry_keys(context, private->iconv_convenience, private, msg, userAccountControl, entry_ex);
+ ret = LDB_message2entry_keys(context, p->iconv_convenience, p, msg, userAccountControl, entry_ex);
if (ret) {
/* Could be bougus data in the entry, or out of memory */
goto out;
@@ -679,9 +679,9 @@ static krb5_error_code LDB_message2entry(krb5_context context, HDB *db,
}
- private->msg = talloc_steal(private, msg);
- private->realm_ref_msg = talloc_steal(private, realm_ref_msg);
- private->samdb = (struct ldb_context *)db->hdb_db;
+ p->msg = talloc_steal(p, msg);
+ p->realm_ref_msg = talloc_steal(p, realm_ref_msg);
+ p->samdb = (struct ldb_context *)db->hdb_db;
out:
if (ret != 0) {
@@ -712,24 +712,24 @@ static krb5_error_code LDB_trust_message2entry(krb5_context context, HDB *db,
struct samr_Password password_hash;
const struct ldb_val *password_val;
struct trustAuthInOutBlob password_blob;
- struct hdb_ldb_private *private;
+ struct hdb_ldb_private *p;
enum ndr_err_code ndr_err;
int i, ret, trust_direction_flags;
- private = talloc(mem_ctx, struct hdb_ldb_private);
- if (!private) {
+ p = talloc(mem_ctx, struct hdb_ldb_private);
+ if (!p) {
ret = ENOMEM;
goto out;
}
- private->entry_ex = entry_ex;
- private->iconv_convenience = lp_iconv_convenience(lp_ctx);
- private->netbios_name = lp_netbios_name(lp_ctx);
+ p->entry_ex = entry_ex;
+ p->iconv_convenience = lp_iconv_convenience(lp_ctx);
+ p->netbios_name = lp_netbios_name(lp_ctx);
- talloc_set_destructor(private, hdb_ldb_destructor);
+ talloc_set_destructor(p, hdb_ldb_destructor);
- entry_ex->ctx = private;
+ entry_ex->ctx = p;
entry_ex->free_entry = hdb_ldb_free_entry;
/* use 'whenCreated' */
@@ -756,7 +756,7 @@ static krb5_error_code LDB_trust_message2entry(krb5_context context, HDB *db,
goto out;
}
- ndr_err = ndr_pull_struct_blob(password_val, mem_ctx, private->iconv_convenience, &password_blob,
+ ndr_err = ndr_pull_struct_blob(password_val, mem_ctx, p->iconv_convenience, &password_blob,
(ndr_pull_flags_fn_t)ndr_pull_trustAuthInOutBlob);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
ret = EINVAL;
@@ -868,9 +868,9 @@ static krb5_error_code LDB_trust_message2entry(krb5_context context, HDB *db,
}
- private->msg = talloc_steal(private, msg);
- private->realm_ref_msg = NULL;
- private->samdb = (struct ldb_context *)db->hdb_db;
+ p->msg = talloc_steal(p, msg);
+ p->realm_ref_msg = NULL;
+ p->samdb = (struct ldb_context *)db->hdb_db;
out:
if (ret != 0) {
diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
index c11c4a6eee..db824db86c 100644
--- a/source4/kdc/kdc.c
+++ b/source4/kdc/kdc.c
@@ -200,9 +200,9 @@ static void kdc_recv_handler(struct kdc_socket *kdc_socket)
handle fd events on a KDC socket
*/
static void kdc_socket_handler(struct tevent_context *ev, struct tevent_fd *fde,
- uint16_t flags, void *private)
+ uint16_t flags, void *private_data)
{
- struct kdc_socket *kdc_socket = talloc_get_type(private, struct kdc_socket);
+ struct kdc_socket *kdc_socket = talloc_get_type(private_data, struct kdc_socket);
if (flags & EVENT_FD_WRITE) {
kdc_send_handler(kdc_socket);
}
@@ -219,9 +219,9 @@ static void kdc_tcp_terminate_connection(struct kdc_tcp_connection *kdcconn, con
/*
receive a full packet on a KDC connection
*/
-static NTSTATUS kdc_tcp_recv(void *private, DATA_BLOB blob)
+static NTSTATUS kdc_tcp_recv(void *private_data, DATA_BLOB blob)
{
- struct kdc_tcp_connection *kdcconn = talloc_get_type(private,
+ struct kdc_tcp_connection *kdcconn = talloc_get_type(private_data,
struct kdc_tcp_connection);
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
TALLOC_CTX *tmp_ctx = talloc_new(kdcconn);
@@ -293,9 +293,10 @@ static void kdc_tcp_recv_handler(struct stream_connection *conn, uint16_t flags)
/*
called on a tcp recv error
*/
-static void kdc_tcp_recv_error(void *private, NTSTATUS status)
+static void kdc_tcp_recv_error(void *private_data, NTSTATUS status)
{
- struct kdc_tcp_connection *kdcconn = talloc_get_type(private, struct kdc_tcp_connection);
+ struct kdc_tcp_connection *kdcconn = talloc_get_type(private_data,
+ struct kdc_tcp_connection);
kdc_tcp_terminate_connection(kdcconn, nt_errstr(status));
}
diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c
index 74bec85d02..1a0df8e4a1 100644
--- a/source4/kdc/pac-glue.c
+++ b/source4/kdc/pac-glue.c
@@ -111,8 +111,8 @@ krb5_error_code samba_kdc_get_pac(void *priv,
krb5_error_code ret;
NTSTATUS nt_status;
struct auth_serversupplied_info *server_info;
- struct hdb_ldb_private *private = talloc_get_type(client->ctx, struct hdb_ldb_private);
- TALLOC_CTX *mem_ctx = talloc_named(private, 0, "samba_get_pac context");
+ struct hdb_ldb_private *p = talloc_get_type(client->ctx, struct hdb_ldb_private);
+ TALLOC_CTX *mem_ctx = talloc_named(p, 0, "samba_get_pac context");
unsigned int userAccountControl;
if (!mem_ctx) {
@@ -120,16 +120,16 @@ krb5_error_code samba_kdc_get_pac(void *priv,
}
/* The user account may be set not to want the PAC */
- userAccountControl = ldb_msg_find_attr_as_uint(private->msg, "userAccountControl", 0);
+ userAccountControl = ldb_msg_find_attr_as_uint(p->msg, "userAccountControl", 0);
if (userAccountControl & UF_NO_AUTH_DATA_REQUIRED) {
*pac = NULL;
return 0;
}
- nt_status = authsam_make_server_info(mem_ctx, private->samdb,
- private->netbios_name,
- private->msg,
- private->realm_ref_msg,
+ nt_status = authsam_make_server_info(mem_ctx, p->samdb,
+ p->netbios_name,
+ p->msg,
+ p->realm_ref_msg,
data_blob(NULL, 0),
data_blob(NULL, 0),
&server_info);
@@ -139,7 +139,7 @@ krb5_error_code samba_kdc_get_pac(void *priv,
return ENOMEM;
}
- ret = make_pac(context, mem_ctx, private->iconv_convenience, server_info, pac);
+ ret = make_pac(context, mem_ctx, p->iconv_convenience, server_info, pac);
talloc_free(mem_ctx);
return ret;
@@ -156,25 +156,25 @@ krb5_error_code samba_kdc_reget_pac(void *priv, krb5_context context,
unsigned int userAccountControl;
- struct hdb_ldb_private *private = talloc_get_type(server->ctx, struct hdb_ldb_private);
+ struct hdb_ldb_private *p = talloc_get_type(server->ctx, struct hdb_ldb_private);
struct auth_serversupplied_info *server_info_out;
- TALLOC_CTX *mem_ctx = talloc_named(private, 0, "samba_get_pac context");
+ TALLOC_CTX *mem_ctx = talloc_named(p, 0, "samba_get_pac context");
if (!mem_ctx) {
return ENOMEM;
}
/* The service account may be set not to want the PAC */
- userAccountControl = ldb_msg_find_attr_as_uint(private->msg, "userAccountControl", 0);
+ userAccountControl = ldb_msg_find_attr_as_uint(p->msg, "userAccountControl", 0);
if (userAccountControl & UF_NO_AUTH_DATA_REQUIRED) {
talloc_free(mem_ctx);
*pac = NULL;
return 0;
}
- ret = kerberos_pac_to_server_info(mem_ctx, private->iconv_convenience,
+ ret = kerberos_pac_to_server_info(mem_ctx, p->iconv_convenience,
*pac, context, &server_info_out);
/* We will compleatly regenerate this pac */
@@ -185,7 +185,7 @@ krb5_error_code samba_kdc_reget_pac(void *priv, krb5_context context,
return ret;
}
- ret = make_pac(context, mem_ctx, private->iconv_convenience, server_info_out, pac);
+ ret = make_pac(context, mem_ctx, p->iconv_convenience, server_info_out, pac);
talloc_free(mem_ctx);
return ret;
@@ -236,7 +236,7 @@ krb5_error_code samba_kdc_check_client_access(void *priv,
krb5_error_code ret;
NTSTATUS nt_status;
TALLOC_CTX *tmp_ctx = talloc_new(entry_ex->ctx);
- struct hdb_ldb_private *private = talloc_get_type(entry_ex->ctx, struct hdb_ldb_private);
+ struct hdb_ldb_private *p = talloc_get_type(entry_ex->ctx, struct hdb_ldb_private);
char *name, *workstation = NULL;
HostAddresses *addresses = req->req_body.addresses;
int i;
@@ -272,10 +272,10 @@ krb5_error_code samba_kdc_check_client_access(void *priv,
/* we allow all kinds of trusts here */
nt_status = authsam_account_ok(tmp_ctx,
- private->samdb,
+ p->samdb,
MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT | MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT,
- private->msg,
- private->realm_ref_msg,
+ p->msg,
+ p->realm_ref_msg,
workstation,
name, true);
free(name);