summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2008-02-01 02:17:22 +0000
committerRuss Allbery <rra@stanford.edu>2008-02-01 02:17:22 +0000
commit7aadbc3139ef9737421560ad3180218796bd7287 (patch)
treecb110280e1b52e6974a2066934f97315546f0477
parent8107104a98ac92d5334cea00aa82a1ea99b02c62 (diff)
keytab-backend now passes kadmin.local ktadd its options in a specific
order to satisfy the picky option parser.
-rw-r--r--NEWS5
-rwxr-xr-xserver/keytab-backend2
-rwxr-xr-xtests/data/fake-kadmin4
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;