summaryrefslogtreecommitdiff
path: root/sshconnect.h
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2018-07-18 11:34:04 +0000
committerDamien Miller <djm@mindrot.org>2018-07-19 21:41:42 +1000
commit258dc8bb07dfb35a46e52b0822a2c5b7027df60a (patch)
tree0076c7e0f10f5f525efbd9f7499e5707203b743f /sshconnect.h
parentac590760b251506b0a152551abbf8e8d6dc2f527 (diff)
upstream: Remove support for running ssh(1) setuid and fatal if
attempted. Do not link uidwap.c into ssh any more. Neuters UsePrivilegedPort, which will be marked as deprecated shortly. ok markus@ djm@ OpenBSD-Commit-ID: c4ba5bf9c096f57a6ed15b713a1d7e9e2e373c42
Diffstat (limited to 'sshconnect.h')
-rw-r--r--sshconnect.h21
1 files changed, 1 insertions, 20 deletions
diff --git a/sshconnect.h b/sshconnect.h
index 6bba62ad0..05a1fb327 100644
--- a/sshconnect.h
+++ b/sshconnect.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.h,v 1.33 2018/07/16 11:05:41 dtucker Exp $ */ 1/* $OpenBSD: sshconnect.h,v 1.34 2018/07/18 11:34:04 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -57,22 +57,3 @@ void ssh_put_password(char *);
57int ssh_local_cmd(const char *); 57int ssh_local_cmd(const char *);
58 58
59void maybe_add_key_to_agent(char *, const struct sshkey *, char *, char *); 59void maybe_add_key_to_agent(char *, const struct sshkey *, char *, char *);
60
61/*
62 * Macros to raise/lower permissions.
63 */
64#define PRIV_START do { \
65 int save_errno = errno; \
66 if (seteuid(original_effective_uid) != 0) \
67 fatal("PRIV_START: seteuid: %s", \
68 strerror(errno)); \
69 errno = save_errno; \
70} while (0)
71
72#define PRIV_END do { \
73 int save_errno = errno; \
74 if (seteuid(original_real_uid) != 0) \
75 fatal("PRIV_END: seteuid: %s", \
76 strerror(errno)); \
77 errno = save_errno; \
78} while (0)