From 03d6e9548d62243c687d1461f503372f9e888238 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 31 Aug 2006 22:08:45 +0000 Subject: [PATCH] Declare get_date() used from kadmin cli code. In calls, delete the second argument that get_date doesn't take. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18556 dc483132-0cff-0310-8789-dd5450dbe970 --- src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c | 12 +++++------- src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c | 5 +++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c index 7bcac41a6..6e6de4982 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c @@ -39,15 +39,13 @@ #include "kdb5_ldap_util.h" #include "kdb5_ldap_list.h" #include "ldap_tkt_policy.h" +extern time_t get_date(char *); /* kadmin/cli/getdate.o */ static void print_policy_params(krb5_ldap_policy_params *policyparams, int mask); static char *strdur(time_t duration); -/* get_date() function used from src/kadmin/ldap_util/getdate.c */ - extern char *yes; - /* * This function will create a ticket policy object with the * specified attributes. @@ -88,7 +86,7 @@ kdb5_ldap_create_policy(argc, argv) if (++i > argc - 1) goto err_usage; - date = get_date(argv[i], NULL); + date = get_date(argv[i]); if (date == (time_t)(-1)) { retval = EINVAL; com_err (me, retval, "while providing time specification"); @@ -102,7 +100,7 @@ kdb5_ldap_create_policy(argc, argv) if (++i > argc - 1) goto err_usage; - date = get_date(argv[i], NULL); + date = get_date(argv[i]); if (date == (time_t)(-1)) { retval = EINVAL; com_err (me, retval, "while providing time specification"); @@ -454,7 +452,7 @@ kdb5_ldap_modify_policy(argc, argv) if (++i > argc - 1) goto err_usage; - date = get_date(argv[i], NULL); + date = get_date(argv[i]); if (date == (time_t)(-1)) { retval = EINVAL; com_err (me, retval, "while providing time specification"); @@ -468,7 +466,7 @@ kdb5_ldap_modify_policy(argc, argv) if (++i > argc - 1) goto err_usage; - date = get_date(argv[i], NULL); + date = get_date(argv[i]); if (date == (time_t)(-1)) { retval = EINVAL; com_err (me, retval, "while providing time specification"); diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c index cbfb5b0dd..ea98647da 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c @@ -87,6 +87,7 @@ #include "kdb5_ldap_util.h" #include "kdb5_ldap_list.h" #include +extern time_t get_date(char *); /* kadmin/cli/getdate.o */ char *yes = "yes\n"; /* \n to compare against result of fgets */ krb5_key_salt_tuple def_kslist = {ENCTYPE_DES_CBC_CRC, KRB5_KDB_SALTTYPE_NORMAL}; @@ -148,7 +149,7 @@ static int get_ticket_policy(rparams,i,argv,argc) if (!strcmp(argv[*i], "-maxtktlife")) { if (++(*i) > argc-1) goto err_usage; - date = get_date(argv[*i], NULL); + date = get_date(argv[*i]); if (date == (time_t)(-1)) { retval = EINVAL; com_err (me, retval, "while providing time specification"); @@ -163,7 +164,7 @@ static int get_ticket_policy(rparams,i,argv,argc) if (++(*i) > argc-1) goto err_usage; - date = get_date(argv[*i], NULL); + date = get_date(argv[*i]); if (date == (time_t)(-1)) { retval = EINVAL; com_err (me, retval, "while providing time specification"); -- 2.26.2