Displaying 5 results from an estimated 5 matches for "has_create_token".
2002 Jul 31
0
[PATCH]: Match Cygwin version check to reality
...ne ntsec_off(c) ((c) && strstr((c),"nontsec"))
#define ntea_on(c) ((c) && strstr((c),"ntea") && !strstr((c),"nontea"))
#if defined(open) && open == binary_open
@@ -74,6 +75,56 @@ int binary_pipe(int fd[2])
return ret;
}
+#define HAS_CREATE_TOKEN 1
+#define HAS_NTSEC_BY_DEFAULT 2
+
+static int has_capability(int what)
+{
+ /* has_capability() basically calls uname() and checks if
+ specific capabilities of Cygwin can be evaluated from that.
+ This simplifies the calling functions which only have to ask
+ for a capability using has_...
2002 Nov 09
1
[PATCH] Two Cygwin related patches
...ne ntsec_off(c) ((c) && strstr((c),"nontsec"))
#define ntea_on(c) ((c) && strstr((c),"ntea") && !strstr((c),"nontea"))
#if defined(open) && open == binary_open
@@ -74,6 +75,56 @@ int binary_pipe(int fd[2])
return ret;
}
+#define HAS_CREATE_TOKEN 1
+#define HAS_NTSEC_BY_DEFAULT 2
+
+static int has_capability(int what)
+{
+ /* has_capability() basically calls uname() and checks if
+ specific capabilities of Cygwin can be evaluated from that.
+ This simplifies the calling functions which only have to ask
+ for a capability using has_...
2001 Jul 11
2
[PATCH]: Cygwin: Allow sshd to switch user context without password
...rsions >= 1.3.2 anymore which
+ * uses the undocumented NtCreateToken() call to create a user
+ * token if the process has the appropriate privileges and if
+ * CYGWIN ntsec setting is on.
*/
- if (is_winnt && !pwd_authenticated && geteuid() != uid)
- return 0;
-
+ static int has_create_token = -1;
+
+ if (is_winnt) {
+ if (has_create_token < 0) {
+ struct utsname uts;
+ int major_high = 0, major_low = 0, minor = 0;
+ char *cygwin = getenv("CYGWIN");
+
+ has_create_token = 0;
+ if (ntsec_on(cygwin) && !uname(&uts)) {
+ sscanf(uts.release, &q...
2004 Apr 18
0
[PATCH] bsd-cygwin_util.c: Relax pubkey authentication prerequisites
...e: /cvs/openssh_cvs/openbsd-compat/bsd-cygwin_util.c,v
retrieving revision 1.11
diff -p -u -r1.11 bsd-cygwin_util.c
--- openbsd-compat/bsd-cygwin_util.c 7 Aug 2003 06:23:43 -0000 1.11
+++ openbsd-compat/bsd-cygwin_util.c 18 Apr 2004 10:13:03 -0000
@@ -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_...
2001 Dec 18
2
[PATCH]: Fix potential security hole in Cygwin version
...nary_pipe(int fd[2])
return ret;
}
-int check_nt_auth(int pwd_authenticated, uid_t uid)
+int check_nt_auth(int pwd_authenticated, struct passwd *pw)
{
/*
* The only authentication which is able to change the user
@@ -73,6 +73,8 @@ int check_nt_auth(int pwd_authenticated,
*/
static int has_create_token = -1;
+ if (pw == NULL)
+ return 0;
if (is_winnt) {
if (has_create_token < 0) {
struct utsname uts;
@@ -90,7 +92,7 @@ int check_nt_auth(int pwd_authenticated,
}
}
if (has_create_token < 1 &&
- !pwd_authenticated && geteuid() != uid)
+ !pwd_authe...