aboutsummaryrefslogtreecommitdiff
path: root/src/lib/process/setuid.h
blob: fec35a121673991f81ddf01b3b056f3239901dc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Copyright (c) 2003-2004, Roger Dingledine
 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
 * Copyright (c) 2007-2020, The Tor Project, Inc. */
/* See LICENSE for licensing information */

/**
 * \file setuid.h
 * \brief Header for setuid.c
 **/

#ifndef TOR_SETUID_H
#define TOR_SETUID_H

int have_capability_support(void);

/** Flag for switch_id; see switch_id() for documentation */
#define SWITCH_ID_KEEP_BINDLOW    (1<<0)
/** Flag for switch_id; see switch_id() for documentation */
#define SWITCH_ID_WARN_IF_NO_CAPS (1<<1)
int switch_id(const char *user, unsigned flags);

#endif /* !defined(TOR_SETUID_H) */