]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - openssh/patches/openssh-5.9p1-keygen.patch
openssh: Update to 5.9p1.
[people/amarx/ipfire-3.x.git] / openssh / patches / openssh-5.9p1-keygen.patch
CommitLineData
9d8fd3ad
SS
1diff -up openssh-5.9p0/ssh-keygen.0.keygen openssh-5.9p0/ssh-keygen.0
2--- openssh-5.9p0/ssh-keygen.0.keygen 2011-08-29 16:30:02.000000000 +0200
3+++ openssh-5.9p0/ssh-keygen.0 2011-08-30 13:47:56.208087184 +0200
4@@ -4,7 +4,7 @@ NAME
5 ssh-keygen - authentication key generation, management and conversion
6
7 SYNOPSIS
8- ssh-keygen [-q] [-b bits] -t type [-N new_passphrase] [-C comment]
9+ ssh-keygen [-q] [-o] [-b bits] -t type [-N new_passphrase] [-C comment]
10 [-f output_keyfile]
11 ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]
12 ssh-keygen -i [-m key_format] [-f input_keyfile]
13@@ -181,6 +181,8 @@ DESCRIPTION
14 principals may be specified, separated by commas. Please see the
15 CERTIFICATES section for details.
16
17+ -o Overwrite the key without prompting user.
18+
19 -O option
20 Specify a certificate option when signing a key. This option may
21 be specified multiple times. Please see the CERTIFICATES section
22diff -up openssh-5.9p0/ssh-keygen.1.keygen openssh-5.9p0/ssh-keygen.1
23--- openssh-5.9p0/ssh-keygen.1.keygen 2011-08-30 13:32:30.787149917 +0200
24+++ openssh-5.9p0/ssh-keygen.1 2011-08-30 13:46:42.638087171 +0200
25@@ -45,6 +45,7 @@
26 .Bk -words
27 .Nm ssh-keygen
28 .Op Fl q
29+.Op Fl o
30 .Op Fl b Ar bits
31 .Fl t Ar type
32 .Op Fl N Ar new_passphrase
33@@ -339,6 +340,8 @@ Multiple principals may be specified, se
34 Please see the
35 .Sx CERTIFICATES
36 section for details.
37+.It Fl o
38+Overwrite the key without prompting user.
39 .It Fl O Ar option
40 Specify a certificate option when signing a key.
41 This option may be specified multiple times.
42diff -up openssh-5.9p0/ssh-keygen.c.keygen openssh-5.9p0/ssh-keygen.c
43--- openssh-5.9p0/ssh-keygen.c.keygen 2011-08-30 13:32:20.268149992 +0200
44+++ openssh-5.9p0/ssh-keygen.c 2011-08-30 13:39:34.550214102 +0200
45@@ -73,6 +73,7 @@ int change_passphrase = 0;
46 int change_comment = 0;
47
48 int quiet = 0;
49+int overwrite = 0;
50
51 int log_level = SYSLOG_LEVEL_INFO;
52
53@@ -1959,7 +1960,7 @@ main(int argc, char **argv)
54 exit(1);
55 }
56
57- while ((opt = getopt(argc, argv, "AegiqpclBHLhvxXyF:b:f:t:D:I:P:m:N:n:"
58+ while ((opt = getopt(argc, argv, "AegiqopclBHLhvxXyF:b:f:t:D:I:P:m:N:n:"
59 "O:C:r:g:R:T:G:M:S:s:a:V:W:z:")) != -1) {
60 switch (opt) {
61 case 'A':
62@@ -2042,6 +2043,9 @@ main(int argc, char **argv)
63 case 'q':
64 quiet = 1;
65 break;
66+ case 'o':
67+ overwrite = 1;
68+ break;
69 case 'e':
70 case 'x':
71 /* export key */
72@@ -2278,7 +2282,7 @@ main(int argc, char **argv)
73 }
74 }
75 /* If the file already exists, ask the user to confirm. */
76- if (stat(identity_file, &st) >= 0) {
77+ if (!overwrite && stat(identity_file, &st) >= 0) {
78 char yesno[3];
79 printf("%s already exists.\n", identity_file);
80 printf("Overwrite (y/n)? ");