1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Lustre curproc API declaration
6 * Copyright (C) 2004 Cluster File Systems, Inc.
7 * Author: Nikita Danilov <nikita@clusterfs.com>
9 * This file is part of Lustre, http://www.lustre.org.
11 * Lustre is free software; you can redistribute it and/or modify it under the
12 * terms of version 2 of the GNU General Public License as published by the
13 * Free Software Foundation. Lustre is distributed in the hope that it will be
14 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16 * Public License for more details. You should have received a copy of the GNU
17 * General Public License along with Lustre; if not, write to the Free
18 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __LIBCFS_CURPROC_H__
21 #define __LIBCFS_CURPROC_H__
25 * Portable API to access common characteristics of "current" UNIX process.
27 * Implemented in portals/include/libcfs/<os>/
29 uid_t cfs_curproc_uid(void);
30 gid_t cfs_curproc_gid(void);
31 uid_t cfs_curproc_fsuid(void);
32 gid_t cfs_curproc_fsgid(void);
33 pid_t cfs_curproc_pid(void);
34 int cfs_curproc_groups_nr(void);
35 int cfs_curproc_is_in_groups(gid_t group);
36 void cfs_curproc_groups_dump(gid_t *array, int size);
37 mode_t cfs_curproc_umask(void);
38 char *cfs_curproc_comm(void);
42 * Plus, platform-specific constant
44 * CFS_CURPROC_COMM_MAX,
46 * and opaque scalar type
50 cfs_kernel_cap_t cfs_curproc_cap_get(void);
51 void cfs_curproc_cap_set(cfs_kernel_cap_t cap);
54 /* __LIBCFS_CURPROC_H__ */
58 * c-indentation-style: "K&R"