(add_one_principal): don't continue if create_principal fails

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11555 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2002-12-03 14:10:30 +00:00
parent 0949f5042e
commit 5807150c8b

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997-2000 Kungliga Tekniska H<>gskolan * Copyright (c) 1997-2002 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -136,8 +136,10 @@ add_one_principal (const char *name,
} }
ret = kadm5_create_principal(kadm_handle, &princ, mask, password); ret = kadm5_create_principal(kadm_handle, &princ, mask, password);
if(ret) if(ret) {
krb5_warn(context, ret, "kadm5_create_principal"); krb5_warn(context, ret, "kadm5_create_principal");
goto out;
}
if(rand_key) { if(rand_key) {
krb5_keyblock *new_keys; krb5_keyblock *new_keys;
int n_keys, i; int n_keys, i;