mod.c (72445) | mod.c (120945) |
---|---|
1/* 2 * Copyright (c) 1997 - 2000 Kungliga Tekniska H�gskolan 3 * (Royal Institute of Technology, Stockholm, Sweden). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 19 unchanged lines hidden (view full) --- 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#include "kadmin_locl.h" 35 | 1/* 2 * Copyright (c) 1997 - 2000 Kungliga Tekniska H�gskolan 3 * (Royal Institute of Technology, Stockholm, Sweden). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 19 unchanged lines hidden (view full) --- 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#include "kadmin_locl.h" 35 |
36RCSID("$Id: mod.c,v 1.10 2000/07/11 14:34:56 joda Exp $"); | 36RCSID("$Id: mod.c,v 1.11 2002/12/03 14:12:30 joda Exp $"); |
37 38static int parse_args (krb5_context context, kadm5_principal_ent_t ent, 39 int argc, char **argv, int *optind, char *name, 40 int *mask); 41 42static int 43parse_args(krb5_context context, kadm5_principal_ent_t ent, 44 int argc, char **argv, int *optind, char *name, --- 86 unchanged lines hidden (view full) --- 131 KADM5_MAX_LIFE | KADM5_MAX_RLIFE | 132 KADM5_PRINC_EXPIRE_TIME | 133 KADM5_PW_EXPIRATION); 134 krb5_free_principal (context, princ_ent); 135 if (ret) { 136 printf ("no such principal: %s\n", argv[0]); 137 return 0; 138 } | 37 38static int parse_args (krb5_context context, kadm5_principal_ent_t ent, 39 int argc, char **argv, int *optind, char *name, 40 int *mask); 41 42static int 43parse_args(krb5_context context, kadm5_principal_ent_t ent, 44 int argc, char **argv, int *optind, char *name, --- 86 unchanged lines hidden (view full) --- 131 KADM5_MAX_LIFE | KADM5_MAX_RLIFE | 132 KADM5_PRINC_EXPIRE_TIME | 133 KADM5_PW_EXPIRATION); 134 krb5_free_principal (context, princ_ent); 135 if (ret) { 136 printf ("no such principal: %s\n", argv[0]); 137 return 0; 138 } |
139 edit_entry(&princ, &mask, NULL, 0); | 139 if(edit_entry(&princ, &mask, NULL, 0)) 140 goto out; |
140 } else { 141 princ.principal = princ_ent; 142 } 143 144 ret = kadm5_modify_principal(kadm_handle, &princ, mask); 145 if(ret) 146 krb5_warn(context, ret, "kadm5_modify_principal"); | 141 } else { 142 princ.principal = princ_ent; 143 } 144 145 ret = kadm5_modify_principal(kadm_handle, &princ, mask); 146 if(ret) 147 krb5_warn(context, ret, "kadm5_modify_principal"); |
148 out: |
|
147 kadm5_free_principal_ent(kadm_handle, &princ); 148 return 0; 149} | 149 kadm5_free_principal_ent(kadm_handle, &princ); 150 return 0; 151} |