OpenSSH: Revert few local modifications.
authorzrj <rimvydas.jasinskas@gmail.com>
Tue, 16 Apr 2019 08:15:32 +0000 (11:15 +0300)
committerzrj <zrj@dragonflybsd.org>
Wed, 24 Apr 2019 17:16:40 +0000 (20:16 +0300)
Some are already in newer version. Others will be re-applied.

crypto/openssh/auth-pam.c
crypto/openssh/openbsd-compat/port-tun.c
crypto/openssh/servconf.c
crypto/openssh/session.c
crypto/openssh/sftp-common.c
crypto/openssh/sshconnect.c
crypto/openssh/sshlogin.c
crypto/openssh/umac128.c [deleted file]

index de877ab..de29c04 100644 (file)
@@ -284,7 +284,7 @@ sshpam_chauthtok_ruid(pam_handle_t *pamh, int flags)
 # define pam_chauthtok(a,b)    (sshpam_chauthtok_ruid((a), (b)))
 #endif
 
 # define pam_chauthtok(a,b)    (sshpam_chauthtok_ruid((a), (b)))
 #endif
 
-static void
+void
 sshpam_password_change_required(int reqd)
 {
        debug3("%s %d", __func__, reqd);
 sshpam_password_change_required(int reqd)
 {
        debug3("%s %d", __func__, reqd);
index b2b5c40..7579c60 100644 (file)
@@ -112,7 +112,7 @@ sys_tun_open(int tun, int mode)
 #include <net/if.h>
 
 #ifdef HAVE_NET_IF_TUN_H
 #include <net/if.h>
 
 #ifdef HAVE_NET_IF_TUN_H
-#include <net/tun/if_tun.h>
+#include <net/if_tun.h>
 #endif
 
 int
 #endif
 
 int
index 9568629..2c321a4 100644 (file)
@@ -1,5 +1,5 @@
 
 
-/* $OpenBSD: servconf.c,v 1.313 2017/10/04 18:49:30 djm Exp $ */
+/* $OpenBSD: servconf.c,v 1.312 2017/10/02 19:33:20 djm Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -1663,9 +1663,9 @@ process_server_config_line(ServerOptions *options, char *line,
                if (!arg || *arg == '\0')
                        fatal("%s line %d: missing PermitOpen specification",
                            filename, linenum);
                if (!arg || *arg == '\0')
                        fatal("%s line %d: missing PermitOpen specification",
                            filename, linenum);
-               value = options->num_permitted_opens;   /* modified later */
+               i = options->num_permitted_opens;       /* modified later */
                if (strcmp(arg, "any") == 0 || strcmp(arg, "none") == 0) {
                if (strcmp(arg, "any") == 0 || strcmp(arg, "none") == 0) {
-                       if (*activep && value == 0) {
+                       if (*activep && i == 0) {
                                options->num_permitted_opens = 1;
                                options->permitted_opens = xcalloc(1,
                                    sizeof(*options->permitted_opens));
                                options->num_permitted_opens = 1;
                                options->permitted_opens = xcalloc(1,
                                    sizeof(*options->permitted_opens));
@@ -1683,7 +1683,7 @@ process_server_config_line(ServerOptions *options, char *line,
                        if (arg == NULL || ((port = permitopen_port(arg)) < 0))
                                fatal("%s line %d: bad port number in "
                                    "PermitOpen", filename, linenum);
                        if (arg == NULL || ((port = permitopen_port(arg)) < 0))
                                fatal("%s line %d: bad port number in "
                                    "PermitOpen", filename, linenum);
-                       if (*activep && value == 0) {
+                       if (*activep && i == 0) {
                                options->permitted_opens = xrecallocarray(
                                    options->permitted_opens,
                                    options->num_permitted_opens,
                                options->permitted_opens = xrecallocarray(
                                    options->permitted_opens,
                                    options->num_permitted_opens,
index 9bcdbf1..5c985e6 100644 (file)
@@ -1237,7 +1237,7 @@ do_nologin(struct passwd *pw)
 #ifdef HAVE_LOGIN_CAP
        if (login_getcapbool(lc, "ignorenologin", 0) || pw->pw_uid == 0)
                return;
 #ifdef HAVE_LOGIN_CAP
        if (login_getcapbool(lc, "ignorenologin", 0) || pw->pw_uid == 0)
                return;
-       nl = strdup(login_getcapstr(lc, "nologin", def_nl, def_nl));
+       nl = login_getcapstr(lc, "nologin", def_nl, def_nl);
 #else
        if (pw->pw_uid == 0)
                return;
 #else
        if (pw->pw_uid == 0)
                return;
index ccc3bce..13a7f5b 100644 (file)
@@ -215,7 +215,7 @@ ls_file(const char *name, const struct stat *st, int remote, int si_units)
 {
        int ulen, glen, sz = 0;
        struct tm *ltime = localtime(&st->st_mtime);
 {
        int ulen, glen, sz = 0;
        struct tm *ltime = localtime(&st->st_mtime);
-       const char *user, *group;
+       char *user, *group;
        char buf[1024], lc[8], mode[11+1], tbuf[12+1], ubuf[11+1], gbuf[11+1];
        char sbuf[FMT_SCALED_STRSIZE];
        time_t now;
        char buf[1024], lc[8], mode[11+1], tbuf[12+1], ubuf[11+1], gbuf[11+1];
        char sbuf[FMT_SCALED_STRSIZE];
        time_t now;
index edf9b8c..dc7a704 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#include <rpc/rpc.h>
 
 #include <ctype.h>
 #include <errno.h>
 
 #include <ctype.h>
 #include <errno.h>
index bbf95b5..cea3e76 100644 (file)
@@ -60,7 +60,6 @@
 #include "buffer.h"
 #include "misc.h"
 #include "servconf.h"
 #include "buffer.h"
 #include "misc.h"
 #include "servconf.h"
-#include "sshlogin.h"
 
 extern Buffer loginmsg;
 extern ServerOptions options;
 
 extern Buffer loginmsg;
 extern ServerOptions options;
diff --git a/crypto/openssh/umac128.c b/crypto/openssh/umac128.c
deleted file mode 100644 (file)
index 628fcf6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/* $FreeBSD: head/crypto/openssh/umac128.c 255767 2013-09-21 21:36:09Z des $ */
-#define        UMAC_OUTPUT_LEN 16
-#undef umac_ctx
-#define        umac_ctx        umac128_ctx
-#undef umac_new
-#define        umac_new        umac128_new
-#undef umac_update
-#define        umac_update     umac128_update
-#undef umac_final
-#define        umac_final      umac128_final
-#undef umac_delete
-#define        umac_delete     umac128_delete
-#include "umac.c"