]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blob - openssh/patches/openssh-5.6p1-keygen.patch
Move all packages to root.
[people/stevee/ipfire-3.x.git] / openssh / patches / openssh-5.6p1-keygen.patch
1 diff -up openssh-5.6p1/ssh-keygen.0.keygen openssh-5.6p1/ssh-keygen.0
2 --- openssh-5.6p1/ssh-keygen.0.keygen 2010-08-22 16:30:03.000000000 +0200
3 +++ openssh-5.6p1/ssh-keygen.0 2010-08-23 12:37:19.000000000 +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 @@ -232,6 +232,8 @@ DESCRIPTION
14
15 -q Silence ssh-keygen. Used by /etc/rc when creating a new key.
16
17 + -o Overwrite the key without prompting user.
18 +
19 -R hostname
20 Removes all keys belonging to hostname from a known_hosts file.
21 This option is useful to delete hashed hosts (see the -H option
22 diff -up openssh-5.6p1/ssh-keygen.1.keygen openssh-5.6p1/ssh-keygen.1
23 --- openssh-5.6p1/ssh-keygen.1.keygen 2010-08-05 05:05:32.000000000 +0200
24 +++ openssh-5.6p1/ssh-keygen.1 2010-08-23 12:36:25.000000000 +0200
25 @@ -47,6 +47,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 @@ -397,6 +398,8 @@ Silence
34 Used by
35 .Pa /etc/rc
36 when creating a new key.
37 +.It Fl o
38 +Overwrite the key without prompting user.
39 .It Fl R Ar hostname
40 Removes all keys belonging to
41 .Ar hostname
42 diff -up openssh-5.6p1/ssh-keygen.c.keygen openssh-5.6p1/ssh-keygen.c
43 --- openssh-5.6p1/ssh-keygen.c.keygen 2010-08-05 05:05:32.000000000 +0200
44 +++ openssh-5.6p1/ssh-keygen.c 2010-08-23 12:34:40.000000000 +0200
45 @@ -72,6 +72,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 @@ -1798,7 +1799,7 @@ main(int argc, char **argv)
54 exit(1);
55 }
56
57 - while ((opt = getopt(argc, argv, "degiqpclBHLhvxXyF:b:f:t:D:I:P:m:N:n:"
58 + while ((opt = getopt(argc, argv, "degiqopclBHLhvxXyF: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 'b':
62 @@ -1878,6 +1879,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 @@ -2124,7 +2128,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)? ");