diff options
author | assar <assar@FreeBSD.org> | 2001-02-13 16:46:19 +0000 |
---|---|---|
committer | assar <assar@FreeBSD.org> | 2001-02-13 16:46:19 +0000 |
commit | 3a971fe69aad52dfd248901ae796e64a96ae3e37 (patch) | |
tree | ac7b5c62510ffa9f0316643bcb19a3fed3d5bef7 /crypto/heimdal/lib/kadm5/get_s.c | |
parent | 2934fc23653f64b32f4db32233d7eda11ca274f0 (diff) | |
parent | ebfe6dc471c206300fd82c7c0fd145f683aa52f6 (diff) | |
download | FreeBSD-src-3a971fe69aad52dfd248901ae796e64a96ae3e37.zip FreeBSD-src-3a971fe69aad52dfd248901ae796e64a96ae3e37.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r72445,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'crypto/heimdal/lib/kadm5/get_s.c')
-rw-r--r-- | crypto/heimdal/lib/kadm5/get_s.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/crypto/heimdal/lib/kadm5/get_s.c b/crypto/heimdal/lib/kadm5/get_s.c index 12613b6..0851900 100644 --- a/crypto/heimdal/lib/kadm5/get_s.c +++ b/crypto/heimdal/lib/kadm5/get_s.c @@ -33,7 +33,7 @@ #include "kadm5_locl.h" -RCSID("$Id: get_s.c,v 1.11 1999/12/26 19:38:23 assar Exp $"); +RCSID("$Id: get_s.c,v 1.13 2000/06/19 16:11:31 joda Exp $"); kadm5_ret_t kadm5_s_get_principal(void *server_handle, @@ -78,8 +78,12 @@ kadm5_s_get_principal(void *server_handle, out->attributes |= ent.flags.server ? 0 : KRB5_KDB_DISALLOW_SVR; out->attributes |= ent.flags.change_pw ? KRB5_KDB_PWCHANGE_SERVICE : 0; } - if(mask & KADM5_MAX_LIFE && ent.max_life) - out->max_life = *ent.max_life; + if(mask & KADM5_MAX_LIFE) { + if(ent.max_life) + out->max_life = *ent.max_life; + else + out->max_life = INT_MAX; + } if(mask & KADM5_MOD_TIME) { if(ent.modified_by) out->mod_date = ent.modified_by->time; @@ -92,10 +96,12 @@ kadm5_s_get_principal(void *server_handle, ret = krb5_copy_principal(context->context, ent.modified_by->principal, &out->mod_name); - } else + } else if(ent.created_by.principal != NULL) ret = krb5_copy_principal(context->context, ent.created_by.principal, &out->mod_name); + else + out->mod_name = NULL; } if(ret) goto out; @@ -115,8 +121,12 @@ kadm5_s_get_principal(void *server_handle, /* XXX implement */; if(mask & KADM5_POLICY) out->policy = NULL; - if(mask & KADM5_MAX_RLIFE && ent.max_renew) - out->max_renewable_life = *ent.max_renew; + if(mask & KADM5_MAX_RLIFE) { + if(ent.max_renew) + out->max_renewable_life = *ent.max_renew; + else + out->max_renewable_life = INT_MAX; + } if(mask & KADM5_LAST_SUCCESS) /* XXX implement */; if(mask & KADM5_LAST_FAILED) @@ -140,7 +150,7 @@ kadm5_s_get_principal(void *server_handle, if(key->salt) kd->key_data_type[1] = key->salt->type; else - kd->key_data_type[1] = pa_pw_salt; + kd->key_data_type[1] = KRB5_PADATA_PW_SALT; /* setup key */ kd->key_data_length[0] = key->key.keyvalue.length; kd->key_data_contents[0] = malloc(kd->key_data_length[0]); |