summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/sshconnect.h
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2006-09-30 13:29:51 +0000
committerdes <des@FreeBSD.org>2006-09-30 13:29:51 +0000
commit2f35ce4773442329d7798ccfecd8db9dcdce89bf (patch)
treebba6f2fe7855d7b0095f9dc7720dc27bea4d1fdf /crypto/openssh/sshconnect.h
parent03ef9d989bf2619956d8c703362439e9be9257ca (diff)
downloadFreeBSD-src-2f35ce4773442329d7798ccfecd8db9dcdce89bf.zip
FreeBSD-src-2f35ce4773442329d7798ccfecd8db9dcdce89bf.tar.gz
Vendor import of OpenSSH 4.4p1.
Diffstat (limited to 'crypto/openssh/sshconnect.h')
-rw-r--r--crypto/openssh/sshconnect.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/crypto/openssh/sshconnect.h b/crypto/openssh/sshconnect.h
index e7c7a2b..4e66bbf 100644
--- a/crypto/openssh/sshconnect.h
+++ b/crypto/openssh/sshconnect.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect.h,v 1.18 2005/12/06 22:38:28 reyk Exp $ */
+/* $OpenBSD: sshconnect.h,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -23,8 +23,6 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SSHCONNECT_H
-#define SSHCONNECT_H
typedef struct Sensitive Sensitive;
struct Sensitive {
@@ -54,16 +52,18 @@ int ssh_local_cmd(const char *);
/*
* Macros to raise/lower permissions.
*/
-#define PRIV_START do { \
- int save_errno = errno; \
- (void)seteuid(original_effective_uid); \
- errno = save_errno; \
+#define PRIV_START do { \
+ int save_errno = errno; \
+ if (seteuid(original_effective_uid) != 0) \
+ fatal("PRIV_START: seteuid: %s", \
+ strerror(errno)); \
+ errno = save_errno; \
} while (0)
-#define PRIV_END do { \
- int save_errno = errno; \
- (void)seteuid(original_real_uid); \
- errno = save_errno; \
+#define PRIV_END do { \
+ int save_errno = errno; \
+ if (seteuid(original_real_uid) != 0) \
+ fatal("PRIV_END: seteuid: %s", \
+ strerror(errno)); \
+ errno = save_errno; \
} while (0)
-
-#endif
OpenPOWER on IntegriCloud