Commit Graph

53 Commits

Author SHA1 Message Date
Love Hörnquist Åstrand
8d40c2994b check return value of alloc functions, from Charles Longeau
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21745 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-31 16:11:25 +00:00
Love Hörnquist Åstrand
c9cde2b10b Clear error string, just to be sure.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21707 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-26 20:20:59 +00:00
Love Hörnquist Åstrand
93eb1b8a47 Make str2time_t parser more robust.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19489 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-22 17:28:27 +00:00
Love Hörnquist Åstrand
0e5d5e7f5e Add KRB5_KDB_ALLOW_DIGEST
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17926 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-08-24 10:49:46 +00:00
Love Hörnquist Åstrand
3d6786f066 (kdb_attrs): Add KRB5_KDB_ALLOW_KERBEROS4
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17652 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-06-14 18:35:08 +00:00
Love Hörnquist Åstrand
e00b4f01bc (kdb_attrs): Add trusted-for-delegation
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17632 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-06-06 21:31:14 +00:00
Love Hörnquist Åstrand
091fba8a25 return 1 on failure, update (c)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16658 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-25 12:29:46 +00:00
Love Hörnquist Åstrand
ff51c4fa4c (foreach_principal): If any of calls to `func' failes, the first error
is returned when all principals are processed.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16652 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-01-25 12:11:09 +00:00
Love Hörnquist Åstrand
5654000990 lower amount of shadow and const warnings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15587 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-07-07 22:06:50 +00:00
Love Hörnquist Åstrand
92c6949daf (kdb_attrs): add ok-as-delegate
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15313 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-30 20:47:04 +00:00
Love Hörnquist Åstrand
3746090a7d (foreach_principal): initialize ret to make sure it have a value
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14860 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-20 10:37:25 +00:00
Johan Danielsson
d970c48c81 print error messages to stderr; change all in-string quoting to use "
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14021 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-07-04 15:09:42 +00:00
Johan Danielsson
efe1bcc986 (str2time_t): fix end-of-day logic, from Duncan McEwan/Mark Davies.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13840 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-05-07 09:03:31 +00:00
Love Hörnquist Åstrand
b44cea4ef2 (str2time_t): allow whitespace between date and time
From: Bob Beck <beck@cvs.openbsd.org> and adharw@yahoo.com


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12965 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-10-04 05:36:29 +00:00
Love Hörnquist Åstrand
c74a90def6 cast argument to tolower to unsigned char,
from Christian Biere <christianbiere@gmx.de> via NetBSD


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12010 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-04-14 11:55:27 +00:00
Johan Danielsson
7f955379c6 (get_response): print a newline if interrupted
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11558 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-12-03 14:14:51 +00:00
Johan Danielsson
646457d75e remove unused variable; reported by Hans Insulander
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11034 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-06-07 18:28:46 +00:00
Assar Westerlund
7b1eba193f (edit_timet): make non-static to be consistent
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10570 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-08-27 23:07:36 +00:00
Assar Westerlund
cdcfeeaefa (get_response): fix krb5_err call
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10480 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-08-10 15:22:20 +00:00
Johan Danielsson
c80e917ff9 do something to handle C-c in prompts
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10477 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-08-10 14:25:32 +00:00
Johan Danielsson
d8b679ffd3 (edit_entry): move setting of default values to a separate function,
set_defaults


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10455 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-08-10 08:00:26 +00:00
Assar Westerlund
d0ddf23f4f (foreach_principal): rely on krb5_warn to get reasonable error
messages


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9939 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-05-14 06:17:20 +00:00
Assar Westerlund
437b1230c7 (foreach_principal): add `funcname' and try printing the error string
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9850 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-05-07 05:29:45 +00:00
Assar Westerlund
0fbfbb5860 (parse_attributes): make empty string mean no attributes, specifying
the empty string at the command line should give you no attributes,
but just pressing return at the prompt gives you default attributes
(edit_entry): only pick up values from the default principal if they
aren't set in the principal being edited


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9473 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-01-11 23:07:29 +00:00
Assar Westerlund
3a443f6afa (str2time_t): rename to make it work
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8982 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-20 01:11:04 +00:00
Assar Westerlund
c071ee122c (str2time_t): add alias for `now'.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8977 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-19 13:19:52 +00:00
Assar Westerlund
2530f9d474 remove unused variable
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8784 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-23 03:14:10 +00:00
Assar Westerlund
72ba28e10a (str2time_t): be more careful with strptime that might zero out the
`struct tm'


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8783 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-23 03:10:02 +00:00
Johan Danielsson
9becec7aee (deltat2str): treat 0 and INT_MAX as never
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8641 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-11 13:01:27 +00:00
Assar Westerlund
3e52cd86f1 (hex2n, parse_des_key): add
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8055 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-03-23 22:55:16 +00:00
Johan Danielsson
c5b916ca6f remove advertising clause
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7464 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-02 17:05:13 +00:00
Assar Westerlund
0d9beca3ed (str2deltat): actually use a `krb5_deltat'
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7367 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-11-13 04:13:52 +00:00
Assar Westerlund
b856d70a06 (edit_timet): break when we manage to parse the time not the inverse.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6849 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-08-19 20:35:31 +00:00
Assar Westerlund
d956c8856b move-around. clean-up, rename, make consistent (and some other weird
stuff).  based on patches from Love <lha@stacken.kth.se>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6844 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-08-19 20:29:04 +00:00
Assar Westerlund
92f49acdf2 (str2timeval, edit_time): functions for parsing and editing times.
Based on patches from Love <lha@stacken.kth.se>.
(edit_entry): call new functions


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6503 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-07-23 22:10:49 +00:00
Assar Westerlund
6f45b38721 (edit_entry): look at default
(edit_time): always set mask even if value == 0


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6356 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-06-23 12:39:19 +00:00
Assar Westerlund
88bf0bfb81 (edit_time, edit_attributes): don't do anything if it's already set
(set_entry): new function


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6126 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-05-04 18:40:29 +00:00
Assar Westerlund
4fb929bff3 (timeval2str): more braces to make gcc happy
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5551 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-03-16 13:30:15 +00:00
Assar Westerlund
da8cf3f5e9 (foreach_principal): don't clobber `ret'
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5047 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-06-30 16:08:11 +00:00
Johan Danielsson
7509c18c0a (foreach_principal): Check for expression before wading through the
whole database.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4931 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-05-23 20:56:55 +00:00
Johan Danielsson
2a93e4ecd7 (foreach_principal): Print error message if `kadm5_get_principals'
fails.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4696 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-04-03 01:57:03 +00:00
Johan Danielsson
ffa7f66531 If kadm5_get_principals failes, we might still be able to perform the
requested opreration (for instance someone if trying to change his own
password).


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4629 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-03-21 01:59:07 +00:00
Johan Danielsson
1d130a4751 Fix order of flags.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4611 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-03-20 23:26:22 +00:00
Johan Danielsson
dc04656b47 (edit_attributes): init `tmp'
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4517 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-03-01 07:14:46 +00:00
Johan Danielsson
2957c97760 Add `include_time' flag to timeval2str.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4501 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-03-01 04:06:06 +00:00
Johan Danielsson
f760f0abfe 1998
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4498 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-03-01 03:33:06 +00:00
Johan Danielsson
19c11448c5 Add function `foreach_principal', that loops over all principals
matching an expression.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4497 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-03-01 03:32:48 +00:00
Assar Westerlund
3c2ff4befb (edit_entry): remove unused variables
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4320 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-01-21 00:15:09 +00:00
Assar Westerlund
4c093e102e (edit_time): only set mask if != 0
(edit_attributes): only set mask if != 0


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4229 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-12-23 00:38:05 +00:00
Assar Westerlund
c0ff4a9b27 (str2deltat, str2attr, get_deltat): return value as pointer and have
return value indicate success.

(get_response): check NULL from fgets

(edit_time, edit_attributes): new functions for reading values and
offering list of answers on '?'

(edit_entry): use edit_time and edit_attributes


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4216 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-12-17 03:20:45 +00:00