-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenssh_4.7p1-8.diff
18198 lines (18028 loc) · 704 KB
/
openssh_4.7p1-8.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--- openssh-4.7p1.orig/key.h
+++ openssh-4.7p1/key.h
@@ -34,6 +34,7 @@
KEY_RSA1,
KEY_RSA,
KEY_DSA,
+ KEY_NULL,
KEY_UNSPEC
};
enum fp_type {
--- openssh-4.7p1.orig/monitor.c
+++ openssh-4.7p1/monitor.c
@@ -133,6 +133,7 @@
int mm_answer_pwnamallow(int, Buffer *);
int mm_answer_auth2_read_banner(int, Buffer *);
int mm_answer_authserv(int, Buffer *);
+int mm_answer_authrole(int, Buffer *);
int mm_answer_authpassword(int, Buffer *);
int mm_answer_bsdauthquery(int, Buffer *);
int mm_answer_bsdauthrespond(int, Buffer *);
@@ -163,6 +164,7 @@
int mm_answer_gss_accept_ctx(int, Buffer *);
int mm_answer_gss_userok(int, Buffer *);
int mm_answer_gss_checkmic(int, Buffer *);
+int mm_answer_gss_sign(int, Buffer *);
#endif
#ifdef SSH_AUDIT_EVENTS
@@ -204,6 +206,7 @@
{MONITOR_REQ_SIGN, MON_ONCE, mm_answer_sign},
{MONITOR_REQ_PWNAM, MON_ONCE, mm_answer_pwnamallow},
{MONITOR_REQ_AUTHSERV, MON_ONCE, mm_answer_authserv},
+ {MONITOR_REQ_AUTHROLE, MON_ONCE, mm_answer_authrole},
{MONITOR_REQ_AUTH2_READ_BANNER, MON_ONCE, mm_answer_auth2_read_banner},
{MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword},
#ifdef USE_PAM
@@ -232,11 +235,17 @@
{MONITOR_REQ_GSSSTEP, MON_ISAUTH, mm_answer_gss_accept_ctx},
{MONITOR_REQ_GSSUSEROK, MON_AUTH, mm_answer_gss_userok},
{MONITOR_REQ_GSSCHECKMIC, MON_ISAUTH, mm_answer_gss_checkmic},
+ {MONITOR_REQ_GSSSIGN, MON_ONCE, mm_answer_gss_sign},
#endif
{0, 0, NULL}
};
struct mon_table mon_dispatch_postauth20[] = {
+#ifdef GSSAPI
+ {MONITOR_REQ_GSSSETUP, 0, mm_answer_gss_setup_ctx},
+ {MONITOR_REQ_GSSSTEP, 0, mm_answer_gss_accept_ctx},
+ {MONITOR_REQ_GSSSIGN, 0, mm_answer_gss_sign},
+#endif
{MONITOR_REQ_MODULI, 0, mm_answer_moduli},
{MONITOR_REQ_SIGN, 0, mm_answer_sign},
{MONITOR_REQ_PTY, 0, mm_answer_pty},
@@ -341,6 +350,10 @@
/* Permit requests for moduli and signatures */
monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
+#ifdef GSSAPI
+ /* and for the GSSAPI key exchange */
+ monitor_permit(mon_dispatch, MONITOR_REQ_GSSSETUP, 1);
+#endif
} else {
mon_dispatch = mon_dispatch_proto15;
@@ -418,6 +431,10 @@
monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
+#ifdef GSSAPI
+ /* and for the GSSAPI key exchange */
+ monitor_permit(mon_dispatch, MONITOR_REQ_GSSSETUP, 1);
+#endif
} else {
mon_dispatch = mon_dispatch_postauth15;
monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
@@ -657,6 +674,7 @@
else {
/* Allow service/style information on the auth context */
monitor_permit(mon_dispatch, MONITOR_REQ_AUTHSERV, 1);
+ monitor_permit(mon_dispatch, MONITOR_REQ_AUTHROLE, 1);
monitor_permit(mon_dispatch, MONITOR_REQ_AUTH2_READ_BANNER, 1);
}
@@ -690,14 +708,37 @@
authctxt->service = buffer_get_string(m, NULL);
authctxt->style = buffer_get_string(m, NULL);
- debug3("%s: service=%s, style=%s",
- __func__, authctxt->service, authctxt->style);
+ authctxt->role = buffer_get_string(m, NULL);
+ debug3("%s: service=%s, style=%s, role=%s",
+ __func__, authctxt->service, authctxt->style, authctxt->role);
if (strlen(authctxt->style) == 0) {
xfree(authctxt->style);
authctxt->style = NULL;
}
+ if (strlen(authctxt->role) == 0) {
+ xfree(authctxt->role);
+ authctxt->role = NULL;
+ }
+
+ return (0);
+}
+
+int
+mm_answer_authrole(int sock, Buffer *m)
+{
+ monitor_permit_authentications(1);
+
+ authctxt->role = buffer_get_string(m, NULL);
+ debug3("%s: role=%s",
+ __func__, authctxt->role);
+
+ if (strlen(authctxt->role) == 0) {
+ xfree(authctxt->role);
+ authctxt->role = NULL;
+ }
+
return (0);
}
@@ -1664,6 +1705,11 @@
kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
+#ifdef GSSAPI
+ kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_server;
+ kex->kex[KEX_GSS_GRP14_SHA1] = kexgss_server;
+ kex->kex[KEX_GSS_GEX_SHA1] = kexgss_server;
+#endif
kex->server = 1;
kex->hostkey_type = buffer_get_int(m);
kex->kex_type = buffer_get_int(m);
@@ -1905,6 +1951,7 @@
monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 0);
monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1);
monitor_permit(mon_dispatch, MONITOR_REQ_GSSCHECKMIC, 1);
+ monitor_permit(mon_dispatch, MONITOR_REQ_GSSSIGN, 1);
}
return (0);
}
@@ -1955,4 +2002,42 @@
/* Monitor loop will terminate if authenticated */
return (authenticated);
}
+
+int
+mm_answer_gss_sign(int socket, Buffer *m)
+{
+ gss_buffer_desc data;
+ gss_buffer_desc hash = GSS_C_EMPTY_BUFFER;
+ OM_uint32 major, minor;
+ u_int len;
+
+ data.value = buffer_get_string(m, &len);
+ data.length = len;
+ if (data.length != 20)
+ fatal("%s: data length incorrect: %d", __func__, data.length);
+
+ /* Save the session ID on the first time around */
+ if (session_id2_len == 0) {
+ session_id2_len = data.length;
+ session_id2 = xmalloc(session_id2_len);
+ memcpy(session_id2, data.value, session_id2_len);
+ }
+ major = ssh_gssapi_sign(gsscontext, &data, &hash);
+
+ xfree(data.value);
+
+ buffer_clear(m);
+ buffer_put_int(m, major);
+ buffer_put_string(m, hash.value, hash.length);
+
+ mm_request_send(socket, MONITOR_ANS_GSSSIGN, m);
+
+ gss_release_buffer(&minor, &hash);
+
+ /* Turn on getpwnam permissions */
+ monitor_permit(mon_dispatch, MONITOR_REQ_PWNAM, 1);
+
+ return (0);
+}
+
#endif /* GSSAPI */
--- openssh-4.7p1.orig/sshconnect.c
+++ openssh-4.7p1/sshconnect.c
@@ -74,6 +74,13 @@
#define INET6_ADDRSTRLEN 46
#endif
+static sig_atomic_t banner_timedout;
+
+static void banner_alarm_catch (int signum)
+{
+ banner_timedout = 1;
+}
+
static int show_other_keys(const char *, Key *);
static void warn_changed_key(Key *);
@@ -157,7 +164,7 @@
xfree(command_string);
/* Set the connection file descriptors. */
- packet_set_connection(pout[0], pin[1]);
+ packet_set_connection(pout[0], pin[1], options.setuptimeout);
/* Indicate OK return */
return 0;
@@ -385,7 +392,7 @@
error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
/* Set the connection. */
- packet_set_connection(sock, sock);
+ packet_set_connection(sock, sock, options.setuptimeout);
return 0;
}
@@ -403,16 +410,40 @@
int connection_out = packet_get_connection_out();
int minor1 = PROTOCOL_MINOR_1;
u_int i, n;
+ struct sigaction sa, osa;
+ /* Read other side's version identification.
+ * If SetupTimeOut has been set, give up after the specified amount
+ * of time.
+ */
+ if (options.setuptimeout > 0) {
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = banner_alarm_catch;
+ /* throw away any pending alarms, since we'd block otherwise */
+ alarm(0);
+ sigaction(SIGALRM, &sa, &osa);
+ alarm(options.setuptimeout);
+ }
/* Read other side's version identification. */
for (n = 0;;) {
- for (i = 0; i < sizeof(buf) - 1; i++) {
- size_t len = atomicio(read, connection_in, &buf[i], 1);
+ for (i = 0; i < sizeof(buf) - 1; ) {
+ ssize_t len = read(connection_in, &buf[i], 1);
+ if (banner_timedout)
+ fatal("ssh_exchange_identification: Timeout waiting for version information.");
+ if (len == 0)
+ errno = EPIPE;
if (len != 1 && errno == EPIPE)
fatal("ssh_exchange_identification: Connection closed by remote host");
- else if (len != 1)
+ else if (len != 1) {
+#ifdef EWOULDBLOCK
+ if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)
+#else
+ if (errno == EINTR || errno == EAGAIN)
+#endif
+ continue;
fatal("ssh_exchange_identification: read: %.100s", strerror(errno));
+ }
if (buf[i] == '\r') {
buf[i] = '\n';
buf[i + 1] = 0;
@@ -422,8 +453,13 @@
buf[i + 1] = 0;
break;
}
+ if (buf[i] == '\r') {
+ buf[i] = '\n';
+ buf[i + 1] = 0; /**XXX wait for \n */
+ }
if (++n > 65536)
fatal("ssh_exchange_identification: No banner received");
+ i++;
}
buf[sizeof(buf) - 1] = 0;
if (strncmp(buf, "SSH-", 4) == 0)
@@ -432,6 +468,14 @@
}
server_version_string = xstrdup(buf);
+ /* If SetupTimeOut has been set, unset the alarm now, and
+ * put the correct handler for SIGALRM back.
+ */
+ if (options.setuptimeout > 0) {
+ alarm(0);
+ sigaction(SIGALRM, &osa, NULL);
+ }
+
/*
* Check that the versions match. In future this might accept
* several versions and set appropriate flags to handle them.
@@ -487,7 +531,7 @@
snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n",
compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1,
compat20 ? PROTOCOL_MINOR_2 : minor1,
- SSH_VERSION);
+ SSH_RELEASE);
if (atomicio(vwrite, connection_out, buf, strlen(buf)) != strlen(buf))
fatal("write: %.100s", strerror(errno));
client_version_string = xstrdup(buf);
--- openssh-4.7p1.orig/configure
+++ openssh-4.7p1/configure
@@ -203,7 +203,7 @@
echo as_func_ret_failure succeeded.
fi
-if (set x; as_func_ret_success y && test x = \"\$1\" ); then
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
:
else
exitcode=1
@@ -407,7 +407,7 @@
echo as_func_ret_failure succeeded.
fi
-if (set x; as_func_ret_success y && test x = \"\$1\" ); then
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
:
else
exitcode=1
@@ -7113,7 +7113,118 @@
#define SSH_TUN_PREPEND_AF 1
_ACEOF
- ;;
+ { echo "$as_me:$LINENO: checking if we have the Security Authorization Session API" >&5
+echo $ECHO_N "checking if we have the Security Authorization Session API... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <Security/AuthSession.h>
+int
+main ()
+{
+SessionCreate(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_use_security_session_api="yes"
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_SECURITY_SESSION_API 1
+_ACEOF
+
+ LIBS="$LIBS -framework Security"
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_use_security_session_api="no"
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { echo "$as_me:$LINENO: checking if we have an in-memory credentials cache" >&5
+echo $ECHO_N "checking if we have an in-memory credentials cache... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <Kerberos/Kerberos.h>
+int
+main ()
+{
+cc_context_t c;
+ (void) cc_initialize (&c, 0, NULL, NULL);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_CCAPI 1
+_ACEOF
+
+ LIBS="$LIBS -framework Security"
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ if test "x$ac_cv_use_security_session_api" = "xno"; then
+ { { echo "$as_me:$LINENO: error: *** Need a security framework to use the credentials cache API ***" >&5
+echo "$as_me: error: *** Need a security framework to use the credentials cache API ***" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
*-*-dragonfly*)
SSHDLIBS="$SSHDLIBS -lcrypt"
;;
@@ -7427,6 +7538,31 @@
_ACEOF
;;
+*-*-k*bsd*-gnu)
+ check_for_libcrypt_later=1
+ cat >>confdefs.h <<\_ACEOF
+#define PAM_TTY_KLUDGE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define LOCKED_PASSWD_PREFIX "!"
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define SPT_TYPE SPT_REUSEARGV
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _PATH_BTMP "/var/log/btmp"
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BTMP 1
+_ACEOF
+
+ ;;
*-*-linux*)
no_dev_ptmx=1
check_for_libcrypt_later=1
@@ -25572,6 +25708,8 @@
echo "${ECHO_T}$ac_cv_lib_selinux_setexeccon" >&6; }
if test $ac_cv_lib_selinux_setexeccon = yes; then
LIBSELINUX="-lselinux"
+ LIBS="$LIBS -lselinux"
+
else
{ { echo "$as_me:$LINENO: error: SELinux support requires libselinux library" >&5
echo "$as_me: error: SELinux support requires libselinux library" >&2;}
--- openssh-4.7p1.orig/configure.ac
+++ openssh-4.7p1/configure.ac
@@ -412,7 +412,31 @@
[Use tunnel device compatibility to OpenBSD])
AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
[Prepend the address family to IP tunnel traffic])
- ;;
+ AC_MSG_CHECKING(if we have the Security Authorization Session API)
+ AC_TRY_COMPILE([#include <Security/AuthSession.h>],
+ [SessionCreate(0, 0);],
+ [ac_cv_use_security_session_api="yes"
+ AC_DEFINE(USE_SECURITY_SESSION_API, 1,
+ [platform has the Security Authorization Session API])
+ LIBS="$LIBS -framework Security"
+ AC_MSG_RESULT(yes)],
+ [ac_cv_use_security_session_api="no"
+ AC_MSG_RESULT(no)])
+ AC_MSG_CHECKING(if we have an in-memory credentials cache)
+ AC_TRY_COMPILE(
+ [#include <Kerberos/Kerberos.h>],
+ [cc_context_t c;
+ (void) cc_initialize (&c, 0, NULL, NULL);],
+ [AC_DEFINE(USE_CCAPI, 1,
+ [platform uses an in-memory credentials cache])
+ LIBS="$LIBS -framework Security"
+ AC_MSG_RESULT(yes)
+ if test "x$ac_cv_use_security_session_api" = "xno"; then
+ AC_MSG_ERROR(*** Need a security framework to use the credentials cache API ***)
+ fi],
+ [AC_MSG_RESULT(no)]
+ )
+ ;;
*-*-dragonfly*)
SSHDLIBS="$SSHDLIBS -lcrypt"
;;
@@ -495,6 +519,14 @@
AC_DEFINE(WITH_ABBREV_NO_TTY)
AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*")
;;
+*-*-k*bsd*-gnu)
+ check_for_libcrypt_later=1
+ AC_DEFINE(PAM_TTY_KLUDGE)
+ AC_DEFINE(LOCKED_PASSWD_PREFIX, "!")
+ AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)
+ AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts])
+ AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins])
+ ;;
*-*-linux*)
no_dev_ptmx=1
check_for_libcrypt_later=1
@@ -3207,9 +3239,12 @@
AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.])
SELINUX_MSG="yes"
AC_CHECK_HEADER([selinux/selinux.h], ,
- AC_MSG_ERROR(SELinux support requires selinux.h header))
- AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ],
- AC_MSG_ERROR(SELinux support requires libselinux library))
+ AC_MSG_ERROR(SELinux support requires selinux.h header))
+ AC_CHECK_LIB(selinux, setexeccon,
+ [ LIBSELINUX="-lselinux"
+ LIBS="$LIBS -lselinux"
+ ],
+ AC_MSG_ERROR(SELinux support requires libselinux library))
SSHDLIBS="$SSHDLIBS $LIBSELINUX"
AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level)
LIBS="$save_LIBS"
--- openssh-4.7p1.orig/ssh-keyscan.c
+++ openssh-4.7p1/ssh-keyscan.c
@@ -358,7 +358,7 @@
{
int j;
- packet_set_connection(c->c_fd, c->c_fd);
+ packet_set_connection(c->c_fd, c->c_fd, timeout);
enable_compat20();
myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = c->c_keytype == KT_DSA?
"ssh-dss": "ssh-rsa";
--- openssh-4.7p1.orig/debian/openssh-server.if-up
+++ openssh-4.7p1/debian/openssh-server.if-up
@@ -0,0 +1,30 @@
+#! /bin/sh
+# Reload the OpenSSH server when an interface comes up, to allow it to start
+# listening on new addresses.
+
+set -e
+
+# Don't bother to restart sshd when lo is configured.
+if [ "$IFACE" = lo ]; then
+ exit 0
+fi
+
+# Only run from ifup.
+if [ "$MODE" != start ]; then
+ exit 0
+fi
+
+# OpenSSH only cares about inet and inet6. Get thee gone, strange people
+# still using ipx.
+if [ "$ADDRFAM" != inet ] && [ "$ADDRFAM" != inet6 ]; then
+ exit 0
+fi
+
+# Is /usr mounted?
+if [ ! -e /usr/sbin/sshd ]; then
+ exit 0
+fi
+
+/etc/init.d/ssh reload >/dev/null 2>&1 || true
+
+exit 0
--- openssh-4.7p1.orig/debian/ssh-argv0.1
+++ openssh-4.7p1/debian/ssh-argv0.1
@@ -0,0 +1,64 @@
+.Dd September 7, 2001
+.Dt SSH-ARGV0 1
+.Os Debian Project
+.Sh NAME
+.Nm ssh-argv0
+.Nd replaces the old ssh command-name as hostname handling
+.Sh SYNOPSIS
+.Ar hostname | user@hostname
+.Op Fl l Ar login_name
+.Op Ar command
+.Pp
+.Ar hostname | user@hostname
+.Op Fl afgknqstvxACNTX1246
+.Op Fl b Ar bind_address
+.Op Fl c Ar cipher_spec
+.Op Fl e Ar escape_char
+.Op Fl i Ar identity_file
+.Op Fl l Ar login_name
+.Op Fl m Ar mac_spec
+.Op Fl o Ar option
+.Op Fl p Ar port
+.Op Fl F Ar configfile
+.Oo Fl L Xo
+.Sm off
+.Ar port :
+.Ar host :
+.Ar hostport
+.Sm on
+.Xc
+.Oc
+.Oo Fl R Xo
+.Sm off
+.Ar port :
+.Ar host :
+.Ar hostport
+.Sm on
+.Xc
+.Oc
+.Op Fl D Ar port
+.Op Ar command
+.Sh DESCRIPTION
+.Nm
+replaces the old ssh command-name as hostname handling.
+If you link to this script with a hostname then executing the link is
+equivalent to having executed ssh with that hostname as an argument.
+All other arguments are passed to ssh and will be processed normally.
+.Sh OPTIONS
+See
+.Xr ssh 1 .
+.Sh FILES
+See
+.Xr ssh 1 .
+.Sh AUTHORS
+OpenSSH is a derivative of the original and free
+ssh 1.2.12 release by Tatu Ylonen.
+Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
+Theo de Raadt and Dug Song
+removed many bugs, re-added newer features and
+created OpenSSH.
+Markus Friedl contributed the support for SSH
+protocol versions 1.5 and 2.0.
+Jonathan Amery wrote this ssh-argv0 script and the associated documentation.
+.Sh SEE ALSO
+.Xr ssh 1
--- openssh-4.7p1.orig/debian/openssh-server-udeb.dirs
+++ openssh-4.7p1/debian/openssh-server-udeb.dirs
@@ -0,0 +1,3 @@
+usr/bin
+usr/sbin
+var/run/sshd
--- openssh-4.7p1.orig/debian/po/cs.po
+++ openssh-4.7p1/debian/po/cs.po
@@ -0,0 +1,317 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openssh\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2008-01-11 00:10+0000\n"
+"PO-Revision-Date: 2007-04-30 10:22+0200\n"
+"Last-Translator: Miroslav Kure <[email protected]>\n"
+"Language-Team: Czech <[email protected]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../openssh-server.templates:1001
+msgid "Generate a new configuration file for OpenSSH?"
+msgstr "Vytvo�it nov羸 konfigura�n穩 soubor OpenSSH?"
+
+#. Type: boolean
+#. Description
+#: ../openssh-server.templates:1001
+msgid ""
+"This version of OpenSSH has a considerably changed configuration file from "
+"the version shipped in Debian 'Potato', which you appear to be upgrading "
+"from. This package can now generate a new configuration file (/etc/ssh/sshd."
+"config), which will work with the new server version, but will not contain "
+"any customizations you made with the old version."
+msgstr ""
+"Tato verze OpenSSH m獺 oproti verzi dod獺van矇 s Debianem 2.2, kterou nyn穩 "
+"pravd�podobn� aktualizujete, zna�n� odli禳n羸 konfigura�n穩 soubor. Bal穩k nyn穩 "
+"m轡鱉e vytvo�it nov羸 konfigura�n穩 soubor (/etc/ssh/sshd.config), kter羸 bude "
+"fungovat s novou verz穩 serveru, ale nebude obsahovat 鱉獺dn矇 繳pravy, kter矇 "
+"jste provedli ve star矇 verzi."
+
+#. Type: boolean
+#. Description
+#: ../openssh-server.templates:1001
+msgid ""
+"Please note that this new configuration file will set the value of "
+"'PermitRootLogin' to 'yes' (meaning that anyone knowing the root password "
+"can ssh directly in as root). Please read the README.Debian file for more "
+"details about this design choice."
+msgstr ""
+"V nov矇m konfigura�n穩m souboru bude parametr PermitRootLogin nastaven na "
+"hodnotu 'yes'. To znamen獺, 鱉e se kdokoliv se znalost穩 rootova hesla m轡鱉e "
+"p�ihl獺sit rovnou jako root. V穩ce o tomto rozhodnut穩 se dozv穩te v souboru "
+"README.Debian."
+
+#. Type: boolean
+#. Description
+#: ../openssh-server.templates:1001
+msgid ""
+"It is strongly recommended that you choose to generate a new configuration "
+"file now."
+msgstr "Je v�ele doporu�eno nechat si nyn穩 vytvo�it nov羸 konfigura�n穩 soubor."
+
+#. Type: boolean
+#. Description
+#: ../openssh-server.templates:2001
+msgid "Do you want to risk killing active SSH sessions?"
+msgstr "Chcete riskovat ukon�en穩 aktivn穩ch SSH spojen穩?"
+
+#. Type: boolean
+#. Description
+#: ../openssh-server.templates:2001
+msgid ""
+"The currently installed version of /etc/init.d/ssh is likely to kill all "
+"running sshd instances. If you are doing this upgrade via an SSH session, "
+"you're likely to be disconnected and leave the upgrade procedure unfinished."
+msgstr ""
+"St獺vaj穩c穩 verze /etc/init.d/ssh pravd�podobn� pozab穩j穩 v禳echny b�鱉穩c穩 "
+"instance sshd. Pokud tuto aktualizaci prov獺d穩te p�es SSH, budete nejsp穩禳e "
+"odpojeni a aktualizace skon�穩 na p轡li cesty."
+
+#. Type: boolean
+#. Description
+#: ../openssh-server.templates:2001
+msgid ""
+"This can be fixed by manually adding \"--pidfile /var/run/sshd.pid\" to the "
+"start-stop-daemon line in the stop section of the file."
+msgstr ""
+"M轡鱉ete to spravit ru�n穩m p�id獺n穩m \"--pidfile /var/run/sshd.pid\" na �獺dek "
+"start-stop-daemon v sekci stop."
+
+#. Type: note
+#. Description
+#: ../openssh-server.templates:3001
+msgid "New host key mandatory"
+msgstr "Nutn羸 nov羸 serverov羸 kl穩�"
+
+#. Type: note
+#. Description
+#: ../openssh-server.templates:3001
+msgid ""
+"The current host key, in /etc/ssh/ssh_host_key, is encrypted with the IDEA "
+"algorithm. OpenSSH can not handle this host key file, and the ssh-keygen "
+"utility from the old (non-free) SSH installation does not appear to be "
+"available."
+msgstr ""
+"Aktu獺ln穩 serverov羸 kl穩� v /etc/ssh/ssh_host_key je 禳ifrovan羸 algoritmem "
+"IDEA. OpenSSH neum穩 tento soubor zpracovat a zd獺 se, 鱉e utilita ssh-keygen "
+"ze star矇 (nesvobodn矇) instalace SSH nen穩 k dispozici."
+
+#. Type: note
+#. Description
+#: ../openssh-server.templates:3001
+msgid "You need to manually generate a new host key."
+msgstr "Mus穩te ru�n� vygenerovat nov羸 serverov羸 kl穩�"
+
+#. Type: boolean
+#. Description
+#: ../openssh-server.templates:4001
+msgid "Disable challenge-response authentication?"
+msgstr "Zak獺zat autentizaci challenge-response?"
+
+#. Type: boolean
+#. Description
+#: ../openssh-server.templates:4001
+msgid ""
+"Password authentication appears to be disabled in the current OpenSSH server "
+"configuration. In order to prevent users from logging in using passwords "
+"(perhaps using only public key authentication instead) with recent versions "
+"of OpenSSH, you must disable challenge-response authentication, or else "
+"ensure that your PAM configuration does not allow Unix password file "
+"authentication."
+msgstr ""
+"Zd獺 se, 鱉e autentizace pomoc穩 hesel je ve va禳穩 st獺vaj穩c穩 konfiguraci OpenSSH "
+"serveru zak獺z獺na. Abyste zabr獺nili u鱉ivatel轡m v p�ihl獺禳en穩 pouze pomoc穩 "
+"hesla, mus穩te v posledn穩ch verz穩ch OpenSSH zak獺zat autentizaci challenge-"
+"response, nebo jinak zajistit, aby PAM nepovolilo autentizaci v轡�i unixov矇mu "
+"souboru hesel."
+
+#. Type: boolean
+#. Description
+#: ../openssh-server.templates:4001
+msgid ""
+"If you disable challenge-response authentication, then users will not be "
+"able to log in using passwords. If you leave it enabled (the default "
+"answer), then the 'PasswordAuthentication no' option will have no useful "
+"effect unless you also adjust your PAM configuration in /etc/pam.d/ssh."
+msgstr ""
+"Zak獺鱉ete-li autentizaci challenge-response, u鱉ivatel矇 se nebudou moci "
+"p�ihl獺sit pomoc穩 hesel. Nech獺te-li ji povolenu (p�ednastaven獺 odpov��), pak "
+"nebude m穩t volba 'PasswordAuthentication no' 鱉獺dn羸 efekt, pokud ov禳em "
+"neuprav穩te nastaven穩 PAM v /etc/pam.d/ssh."
+
+#~ msgid "Warning: you must create a new host key"
+#~ msgstr "Varov獺n穩: mus穩te vytvo�it nov羸 serverov羸 kl穩�"
+
+#~ msgid "Warning: telnetd is installed --- probably not a good idea"
+#~ msgstr "Varov獺n穩: je nainstalov獺n telnetd --- to nen穩 dobr羸 n獺pad"
+
+#~ msgid ""
+#~ "I'd advise you to either remove the telnetd package (if you don't "
+#~ "actually need to offer telnet access) or install telnetd-ssl so that "
+#~ "there is at least some chance that telnet sessions will not be sending "
+#~ "unencrypted login/password and session information over the network."
+#~ msgstr ""
+#~ "Doporu�ujeme bu� odstranit bal穩k telnetd (pokud telnet p�穩stup "
+#~ "nepot�ebujete), nebo nainstalovat telnetd-ssl, kde je alespo� n�jak獺 "
+#~ "禳ance, 鱉e spojen穩 nebudou po s穩ti zas穩lat neza禳ifrovan獺 jm矇na/hesla/"
+#~ "informace."
+
+#~ msgid "Warning: rsh-server is installed --- probably not a good idea"
+#~ msgstr "Varov獺n穩: je nainstalov獺n rsh-server --- to nen穩 dobr羸 n獺pad"
+
+#~ msgid ""
+#~ "having rsh-server installed undermines the security that you were "
+#~ "probably wanting to obtain by installing ssh. I'd advise you to remove "
+#~ "that package."
+#~ msgstr ""
+#~ "nainstalov獺n穩m rsh-server si bour獺te bezpe�nost, kterou jste "
+#~ "pravd�podobn� cht�li dos獺hnout instalac穩 ssh. Doporu�ujeme tento bal穩k "
+#~ "odstranit."
+
+#~ msgid "Do you want ssh-keysign to be installed SUID root?"
+#~ msgstr "Chcete ssh-keysign nainstalovat jako SUID root?"
+
+#~ msgid ""
+#~ "You have the option of installing the ssh-keysign helper with the SUID "
+#~ "bit set."
+#~ msgstr ""
+#~ "M轡鱉ete si vybrat, zda chcete nainstalovat ssh-keysign s nastaven羸m SUID "
+#~ "bitem."
+
+#~ msgid ""
+#~ "If you make ssh-keysign SUID, you will be able to use SSH's Protocol 2 "
+#~ "host-based authentication."
+#~ msgstr ""
+#~ "Pokud nastav穩te ssh-keysign SUID, m轡鱉ete pou鱉穩vat 'host-based' "
+#~ "autentizaci protokolu verze 2."
+
+#~ msgid ""
+#~ "If in doubt, I suggest you install it with SUID. If it causes problems "
+#~ "you can change your mind later by running: dpkg-reconfigure ssh"
+#~ msgstr ""
+#~ "Pokud jste na pochyb獺ch, doporu�ujeme SUID bit povolit. Pokud zaznamen獺te "
+#~ "probl矇my, m轡鱉ete nastaven穩 zm�nit spu禳t�n穩m: dpkg-reconfigure ssh"
+
+#~ msgid "Allow SSH protocol 2 only"
+#~ msgstr "Povolit pouze SSH protokol verze 2"
+
+#~ msgid ""
+#~ "This version of OpenSSH supports version 2 of the ssh protocol, which is "
+#~ "much more secure. Disabling ssh 1 is encouraged, however this will slow "
+#~ "things down on low end machines and might prevent older clients from "
+#~ "connecting (the ssh client shipped with \"potato\" is affected)."
+#~ msgstr ""
+#~ "Tato verze OpenSSH podporuje ssh protokol ve verzi 2, kter羸 je mnohem "
+#~ "bezpe�n�j禳穩. Je dobr矇 ssh verze 1 zak獺zat, nicm矇n� na slab禳穩ch po�穩ta�穩ch "
+#~ "se projev穩 zpomalen穩 a tak矇 t穩m znemo鱉n穩te p�ihl獺禳en穩 star禳穩ch klient轡 "
+#~ "(nap�穩klad t�ch z Debianu 2.2)."
+
+#~ msgid ""
+#~ "Also please note that keys used for protocol 1 are different so you will "
+#~ "not be able to use them if you only allow protocol 2 connections."
+#~ msgstr ""
+#~ "Tak矇 si v禳imn�te, 鱉e kl穩�e protokolu verze 1 jsou odli禳n矇 a pokud "
+#~ "povol穩te pouze protokol verze 2, nebudete je moci pou鱉穩t. "
+
+#~ msgid ""
+#~ "If you later change your mind about this setting, README.Debian has "
+#~ "instructions on what to do to your sshd_config file."
+#~ msgstr ""
+#~ "Pokud se pozd�ji rozhodnete jinak, v README.Debian se nach獺z穩 p�esn羸 "
+#~ "n獺vod, jak upravit soubor sshd_config."
+
+#~ msgid "ssh2 keys merged in configuration files"
+#~ msgstr "Kl穩�e ssh2 v konfigura�n穩ch souborech byly spojeny"
+
+#~ msgid ""
+#~ "As of version 3 OpenSSH no longer uses separate files for ssh1 and ssh2 "
+#~ "keys. This means the authorized_keys2 and known_hosts2 files are no "
+#~ "longer needed. They will still be read in order to maintain backwards "
+#~ "compatibility"
+#~ msgstr ""
+#~ "OpenSSH verze 3 ji鱉 nepou鱉穩v獺 odd�len矇 soubory pro kl穩�e verze ssh1 a "
+#~ "ssh2. To znamen獺, 鱉e soubory authorized_keys2 a known_hosts2 ji鱉 nejsou "
+#~ "pot�eba, ov禳em z d轡vod轡 zachov獺n穩 zp�tn矇 kompatibility jsou st獺le "
+#~ "na�穩t獺ny."
+
+#~ msgid "NOTE: Forwarding of X11 and Authorization disabled by default."
+#~ msgstr "POZN�MKA: Autorizace a p�esm�rov獺n穩 X11 je standardn� vypnuto."
+
+#~ msgid ""
+#~ "For security reasons, the Debian version of ssh has ForwardX11 and "
+#~ "ForwardAgent set to ``off'' by default."
+#~ msgstr ""
+#~ "Z bezpe�nostn穩ch d轡vod轡 m獺 verze ssh v Debianu standardn� nastaven矇 "
+#~ "ForwardX11 a ForwardAgent na hodnotu \"off\"."
+
+#~ msgid ""
+#~ "You can enable it for servers you trust, either in one of the "
+#~ "configuration files, or with the -X command line option."
+#~ msgstr ""
+#~ "Pro servery, kter羸m d轡v��ujete, m轡鱉ete tyto parametry povolit v jednom z "
+#~ "konfigura�n穩ch soubor轡, nebo z p�穩kazov矇 �獺dky parametrem -X."
+
+#~ msgid "More details can be found in /usr/share/doc/ssh/README.Debian"
+#~ msgstr "V穩ce naleznete v /usr/share/doc/ssh/README.Debian"
+
+#~ msgid "Do you want to run the sshd server?"
+#~ msgstr "Chcete spustit sshd server?"
+
+#~ msgid "This package contains both the ssh client, and the sshd server."
+#~ msgstr "Tento bal穩k obsahuje jak klienta ssh, tak server sshd."
+
+#~ msgid ""
+#~ "Normally the sshd Secure Shell Server will be run to allow remote logins "
+#~ "via ssh."
+#~ msgstr ""
+#~ "Obvykle se sshd (Secure Shell Server) spou禳t穩, aby se vzd獺len穩 u鱉ivatel矇 "
+#~ "mohli p�ihla禳ovat p�es ssh."
+
+#~ msgid ""
+#~ "If you are only interested in using the ssh client for outbound "
+#~ "connections on this machine, and don't want to log into it at all using "
+#~ "ssh, then you can disable sshd here."
+#~ msgstr ""
+#~ "Pokud na tomto po�穩ta�i chcete vyu鱉穩vat pouze ssh klienta pro odchoz穩 "
+#~ "spojen穩, m轡鱉ete zde sshd zak獺zat."
+
+#~ msgid "Environment options on keys have been deprecated"
+#~ msgstr "Volby prost�ed穩 spojen矇 s kl穩�i jsou zak獺z獺ny"
+
+#~ msgid ""
+#~ "This version of OpenSSH disables the environment option for public keys "
+#~ "by default, in order to avoid certain attacks (for example, LD_PRELOAD). "
+#~ "If you are using this option in an authorized_keys file, beware that the "
+#~ "keys in question will no longer work until the option is removed."
+#~ msgstr ""
+#~ "Pro zamezen穩 ur�it羸ch typ轡 繳tok轡 (nap�. LD_PRELOAD), tato verze OpenSSH "
+#~ "standardn� zabra�uje pou鱉穩vat volbu prost�ed穩 u ve�ejn羸ch kl穩�轡. Pokud "
+#~ "tuto volbu pou鱉穩v獺te v souboru authorized_keys, tak posti鱉en矇 kl穩�e "
+#~ "nebudou fungovat, dokud jim tuto volbu nesma鱉ete."
+
+#~ msgid ""
+#~ "To re-enable this option, set \"PermitUserEnvironment yes\" in /etc/ssh/"
+#~ "sshd_config after the upgrade is complete, taking note of the warning in "
+#~ "the sshd_config(5) manual page."
+#~ msgstr ""
+#~ "Pro znovupovolen穩 t矇to volby si po aktualizaci p�e�t�te varov獺n穩 v "
+#~ "manu獺lov矇 str獺nce sshd_config(5) a v souboru /etc/ssh/sshd_config zadejte "
+#~ "\"PermitUserEnvironment yes\"."
--- openssh-4.7p1.orig/debian/po/pt.po
+++ openssh-4.7p1/debian/po/pt.po
@@ -0,0 +1,153 @@
+# Portuguese translation of openssh debconf messages.
+# This file is distributed under the same license as the openssh package.
+# Ricardo Silva <[email protected]>, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openssh 4.3p2-3\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2008-01-11 00:10+0000\n"
+"PO-Revision-Date: 2007-05-09 22:21+0100\n"