From 7aadbc3139ef9737421560ad3180218796bd7287 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 1 Feb 2008 02:17:22 +0000 Subject: keytab-backend now passes kadmin.local ktadd its options in a specific order to satisfy the picky option parser. --- NEWS | 5 +++++ server/keytab-backend | 2 +- tests/data/fake-kadmin | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index a5dcdf4..f5af196 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,10 @@ User-Visible wallet Changes +wallet 0.7 (unreleased) + + keytab-backend now passes kadmin.local ktadd its options in a specific + order to satisfy the picky option parser. + wallet 0.6 (2008-01-28) SECURITY: If -f is used and the output file name with ".new" appended diff --git a/server/keytab-backend b/server/keytab-backend index a06c717..2956730 100755 --- a/server/keytab-backend +++ b/server/keytab-backend @@ -135,7 +135,7 @@ sub download { # Do the actual work. my $filename = "$TMP/keytab$$"; - my $command = "ktadd -q -norandkey -k $filename $principal"; + my $command = "ktadd -k $filename -q -norandkey $principal"; my $output = `$KADMIN -q '$command' 2>&1`; if ($? != 0) { my $status = ($? >> 8); diff --git a/tests/data/fake-kadmin b/tests/data/fake-kadmin index 039d8b2..81dc999 100755 --- a/tests/data/fake-kadmin +++ b/tests/data/fake-kadmin @@ -11,14 +11,14 @@ unless ($ARGV[0] eq '-q' && @ARGV == 2) { die "invalid arguments\n"; } my @command = split (' ', $ARGV[1]); -unless ("@command[0..3]" eq 'ktadd -q -norandkey -k') { +unless ("@command[0,1,3,4]" eq 'ktadd -k -q -norandkey') { die "invalid command @command\n"; } if ($command[5] eq 'error@EXAMPLE.ORG') { warn "Some bad stuff\n"; exit 1; } -open (OUT, '>', $command[4]) or die "cannot create $command[4]: $!\n"; +open (OUT, '>', $command[2]) or die "cannot create $command[2]: $!\n"; print OUT $command[5], "\n"; close OUT; exit 0; -- cgit v1.2.3