]> andersk Git - openssh.git/blobdiff - sshconnect.h
- (tim) [config.guess config.sub] Update to '2005-05-27' version.
[openssh.git] / sshconnect.h
index aeb2e51a579c2a14ffa7201da4eb7c5a52d42029..0be30fe695aa838ddded6f826798c9a4f50455e6 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sshconnect.h,v 1.15 2002/06/09 13:32:01 markus Exp $  */
+/*     $OpenBSD: sshconnect.h,v 1.17 2002/06/19 00:27:55 deraadt Exp $ */
 
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
 
 typedef struct Sensitive Sensitive;
 struct Sensitive {
-       Key     **keys;
-       int     nkeys;
-       int     external_keysign;
+       Key     **keys;
+       int     nkeys;
+       int     external_keysign;
 };
 
 int
 ssh_connect(const char *, struct sockaddr_storage *, u_short, int, int,
-    int, struct passwd *, const char *);
+    int, const char *);
 
 void
 ssh_login(Sensitive *, const char *, struct sockaddr *, struct passwd *);
@@ -50,4 +50,20 @@ void  ssh_userauth2(const char *, const char *, char *, Sensitive *);
 
 void    ssh_put_password(char *);
 
+
+/*
+ * Macros to raise/lower permissions.
+ */
+#define PRIV_START do {                                \
+       int save_errno = errno;                 \
+       (void)seteuid(original_effective_uid);  \
+       errno = save_errno;                     \
+} while (0)
+
+#define PRIV_END do {                          \
+       int save_errno = errno;                 \
+       (void)seteuid(original_real_uid);       \
+       errno = save_errno;                     \
+} while (0)
+
 #endif
This page took 0.060764 seconds and 4 git commands to generate.