blob: 436c10f7569b1798a4b74333ff7f0e16c36b10b5 [file] [log] [blame]
Damien Miller9f2abc42006-07-10 20:53:08 +10001/* $OpenBSD: uidswap.h,v 1.12 2006/07/06 16:03:53 stevesk Exp $ */
Ben Lindstrom36579d32001-01-29 07:39:26 +00002
Damien Millerd4a8b7e1999-10-27 13:42:43 +10003/*
Damien Miller95def091999-11-25 00:26:21 +11004 * Author: Tatu Ylonen <ylo@cs.hut.fi>
Damien Miller95def091999-11-25 00:26:21 +11005 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
6 * All rights reserved
Damien Miller4af51302000-04-16 11:18:38 +10007 *
Damien Millere4340be2000-09-16 13:29:08 +11008 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
Damien Miller95def091999-11-25 00:26:21 +110013 */
Damien Millerd4a8b7e1999-10-27 13:42:43 +100014
15#ifndef UIDSWAP_H
16#define UIDSWAP_H
17
Damien Miller9f2abc42006-07-10 20:53:08 +100018#include <sys/types.h>
19
20#include <pwd.h>
21
Ben Lindstrom4cc240d2001-07-04 04:46:56 +000022void temporarily_use_uid(struct passwd *);
23void restore_uid(void);
24void permanently_set_uid(struct passwd *);
Damien Miller2e5fe882006-06-13 13:10:00 +100025void permanently_drop_suid(uid_t);
Damien Millerd4a8b7e1999-10-27 13:42:43 +100026
Damien Miller95def091999-11-25 00:26:21 +110027#endif /* UIDSWAP_H */