ovload.c revision 54925bf60766fbb4f1f2d7c843721406a7b7a3fb
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
*
* Openvision retains the copyright to derivative works of
* this source code. Do *NOT* create a derivative of this
* source code before consulting with your legal department.
* Do *NOT* integrate *ANY* of this source code into another
* product before consulting with your legal department.
*
* For further information, read the top-level Openvision
* copyright which is contained in the top-level MIT Kerberos
* copyright.
*
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
*
*/
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include "autoconf.h"
#ifdef HAVE_MEMORY_H
#include <memory.h>
#endif
#include <k5-int.h>
#include <kadm5/server_internal.h>
#include <kdb.h>
#include "import_err.h"
#include "kdb5_util.h"
#include "nstrtok.h"
#define PLURAL(count) (((count) == 1) ? error_message(IMPORT_SINGLE_RECORD) : error_message(IMPORT_PLURAL_RECORDS))
char *current;
{
char *cp;
ret = 0;
sizeof(krb5_key_data));
return ENOMEM;
for (i = 0; i < hist->n_key_data; i++) {
ret = IMPORT_FAILED;
goto done;
}
ret = IMPORT_FAILED;
goto done;
}
ret = IMPORT_FAILED;
goto done;
}
if(!(key_data->key_data_contents[0] =
goto done;
}
for(j = 0; j < key_data->key_data_length[0]; j++) {
ret = IMPORT_FAILED;
goto done;
}
}
}
done:
return ret;
}
/*
* Function: parse_principal
*
* Purpose: parse principal line in db dump file
*
* Arguments:
* <return value> 0 on success, error code on failure
*
* Requires:
* principal database to be opened.
* nstrtok(3) to have a valid buffer in memory.
*
* Effects:
* [effects]
*
* Modifies:
* [modifies]
*
*/
char *fname;
int verbose;
int *linenop;
{
char *current;
char *cp;
int x, one;
return IMPORT_BAD_FILE;
}
return IMPORT_BAD_FILE;
return ENOMEM;
goto done;
ret = IMPORT_FAILED;
goto done;
} else {
goto done;
}
}
ret = IMPORT_FAILED;
goto done;
}
ret = IMPORT_FAILED;
goto done;
}
ret = IMPORT_FAILED;
goto done;
}
ret = IMPORT_FAILED;
goto done;
}
if (! rec->old_key_len) {
} else {
goto done;
}
for(x = 0; x < rec->old_key_len; x++)
}
xdr_destroy(&xdrs);
goto done;
}
one = 1;
if (ret)
goto done;
if (ret)
goto done;
if (ret)
goto done;
xdr_destroy(&xdrs);
(*linenop)++;
done:
return ret;
}