summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/openbsd-compat
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2004-04-20 09:35:04 +0000
committerdes <des@FreeBSD.org>2004-04-20 09:35:04 +0000
commit13038249fe2534a8bbf8071e1ce86a5ac3f138ba (patch)
tree9c4c356c89ba7c02d24dd9e9ae86f4b0aa30e4ad /crypto/openssh/openbsd-compat
parent52a5485343646a98c4b521830a1c8b2a18aad3fc (diff)
parentc69db9c5a2d88a51f8d2394cf37717ba93f07152 (diff)
downloadFreeBSD-src-13038249fe2534a8bbf8071e1ce86a5ac3f138ba.zip
FreeBSD-src-13038249fe2534a8bbf8071e1ce86a5ac3f138ba.tar.gz
This commit was generated by cvs2svn to compensate for changes in r128456,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'crypto/openssh/openbsd-compat')
-rw-r--r--crypto/openssh/openbsd-compat/.cvsignore1
-rw-r--r--crypto/openssh/openbsd-compat/bsd-cygwin_util.c12
-rw-r--r--crypto/openssh/openbsd-compat/bsd-misc.h6
-rw-r--r--crypto/openssh/openbsd-compat/setenv.c8
-rw-r--r--crypto/openssh/openbsd-compat/xcrypt.c4
5 files changed, 22 insertions, 9 deletions
diff --git a/crypto/openssh/openbsd-compat/.cvsignore b/crypto/openssh/openbsd-compat/.cvsignore
new file mode 100644
index 0000000..f3c7a7c
--- /dev/null
+++ b/crypto/openssh/openbsd-compat/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/crypto/openssh/openbsd-compat/bsd-cygwin_util.c b/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
index a87cf3c..92cdba6 100644
--- a/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
+++ b/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
@@ -29,7 +29,7 @@
#include "includes.h"
-RCSID("$Id: bsd-cygwin_util.c,v 1.11 2003/08/07 06:23:43 dtucker Exp $");
+RCSID("$Id: bsd-cygwin_util.c,v 1.12 2004/04/18 11:15:45 djm Exp $");
#ifdef HAVE_CYGWIN
@@ -77,6 +77,7 @@ binary_pipe(int fd[2])
#define HAS_CREATE_TOKEN 1
#define HAS_NTSEC_BY_DEFAULT 2
+#define HAS_CREATE_TOKEN_WO_NTSEC 3
static int
has_capability(int what)
@@ -84,6 +85,7 @@ has_capability(int what)
static int inited;
static int has_create_token;
static int has_ntsec_by_default;
+ static int has_create_token_wo_ntsec;
/*
* has_capability() basically calls uname() and checks if
@@ -113,6 +115,9 @@ has_capability(int what)
has_create_token = 1;
if (api_major_version > 0 || api_minor_version >= 56)
has_ntsec_by_default = 1;
+ if (major_high > 1 ||
+ (major_high == 1 && major_low >= 5))
+ has_create_token_wo_ntsec = 1;
inited = 1;
}
}
@@ -121,6 +126,8 @@ has_capability(int what)
return (has_create_token);
case HAS_NTSEC_BY_DEFAULT:
return (has_ntsec_by_default);
+ case HAS_CREATE_TOKEN_WO_NTSEC:
+ return (has_create_token_wo_ntsec);
}
return (0);
}
@@ -151,7 +158,8 @@ check_nt_auth(int pwd_authenticated, struct passwd *pw)
if (has_capability(HAS_CREATE_TOKEN) &&
(ntsec_on(cygwin) ||
(has_capability(HAS_NTSEC_BY_DEFAULT) &&
- !ntsec_off(cygwin))))
+ !ntsec_off(cygwin)) ||
+ has_capability(HAS_CREATE_TOKEN_WO_NTSEC)))
has_create_token = 1;
}
if (has_create_token < 1 &&
diff --git a/crypto/openssh/openbsd-compat/bsd-misc.h b/crypto/openssh/openbsd-compat/bsd-misc.h
index c807394..009739b 100644
--- a/crypto/openssh/openbsd-compat/bsd-misc.h
+++ b/crypto/openssh/openbsd-compat/bsd-misc.h
@@ -1,4 +1,4 @@
-/* $Id: bsd-misc.h,v 1.14 2004/02/17 05:49:55 djm Exp $ */
+/* $Id: bsd-misc.h,v 1.15 2004/03/08 11:59:03 dtucker Exp $ */
/*
* Copyright (c) 1999-2004 Damien Miller <djm@mindrot.org>
@@ -89,6 +89,10 @@ pid_t tcgetpgrp(int);
int tcsendbreak(int, int);
#endif
+#ifndef HAVE_UNSETENV
+void unsetenv(const char *);
+#endif
+
/* wrapper for signal interface */
typedef void (*mysig_t)(int);
mysig_t mysignal(int sig, mysig_t act);
diff --git a/crypto/openssh/openbsd-compat/setenv.c b/crypto/openssh/openbsd-compat/setenv.c
index b7ba0ce..c3a86c6 100644
--- a/crypto/openssh/openbsd-compat/setenv.c
+++ b/crypto/openssh/openbsd-compat/setenv.c
@@ -30,7 +30,7 @@
*/
#include "includes.h"
-#ifndef HAVE_SETENV
+#if !defined(HAVE_SETENV) || !defined(HAVE_UNSETENV)
#if defined(LIBC_SCCS) && !defined(lint)
static char *rcsid = "$OpenBSD: setenv.c,v 1.6 2003/06/02 20:18:38 millert Exp $";
@@ -77,6 +77,7 @@ __findenv(name, offset)
return (NULL);
}
+#ifndef HAVE_SETENV
/*
* setenv --
* Set the value of the environmental variable "name" to be
@@ -138,7 +139,9 @@ setenv(name, value, rewrite)
;
return (0);
}
+#endif /* HAVE_SETENV */
+#ifndef HAVE_UNSETENV
/*
* unsetenv(name) --
* Delete environmental variable "name".
@@ -157,5 +160,6 @@ unsetenv(name)
if (!(*P = *(P + 1)))
break;
}
+#endif /* HAVE_UNSETENV */
-#endif /* HAVE_SETENV */
+#endif /* !defined(HAVE_SETENV) || !defined(HAVE_UNSETENV) */
diff --git a/crypto/openssh/openbsd-compat/xcrypt.c b/crypto/openssh/openbsd-compat/xcrypt.c
index a0fe6c6..c3cea3c 100644
--- a/crypto/openssh/openbsd-compat/xcrypt.c
+++ b/crypto/openssh/openbsd-compat/xcrypt.c
@@ -24,8 +24,6 @@
#include "includes.h"
-#if !defined(HAVE_OSF_SIA)
-
# ifdef HAVE_CRYPT_H
# include <crypt.h>
# endif
@@ -108,5 +106,3 @@ shadow_pw(struct passwd *pw)
return pw_password;
}
-
-#endif /* !defined(HAVE_OSF_SIA) */
OpenPOWER on IntegriCloud