1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
6 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 only,
10 * as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License version 2 for more details (a copy is included
16 * in the LICENSE file that accompanied this code).
18 * You should have received a copy of the GNU General Public License
19 * version 2 along with this program; If not, see [sun.com URL with a
22 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
23 * CA 95054 USA or visit www.sun.com if you need additional information or
29 * Copyright 2008 Sun Microsystems, Inc. All rights reserved
30 * Use is subject to license terms.
33 * This file is part of Lustre, http://www.lustre.org/
34 * Lustre is a trademark of Sun Microsystems, Inc.
36 * libcfs/include/libcfs/curproc.h
38 * Lustre curproc API declaration
40 * Author: Nikita Danilov <nikita@clusterfs.com>
43 #ifndef __LIBCFS_CURPROC_H__
44 #define __LIBCFS_CURPROC_H__
48 * Portable API to access common characteristics of "current" UNIX process.
50 * Implemented in portals/include/libcfs/<os>/
52 uid_t cfs_curproc_uid(void);
53 gid_t cfs_curproc_gid(void);
54 uid_t cfs_curproc_fsuid(void);
55 gid_t cfs_curproc_fsgid(void);
56 pid_t cfs_curproc_pid(void);
57 int cfs_curproc_groups_nr(void);
58 int cfs_curproc_is_in_groups(gid_t group);
59 void cfs_curproc_groups_dump(gid_t *array, int size);
60 mode_t cfs_curproc_umask(void);
61 char *cfs_curproc_comm(void);
65 * Plus, platform-specific constant
67 * CFS_CURPROC_COMM_MAX,
69 * and opaque scalar type
73 cfs_kernel_cap_t cfs_curproc_cap_get(void);
74 void cfs_curproc_cap_set(cfs_kernel_cap_t cap);
77 /* __LIBCFS_CURPROC_H__ */
81 * c-indentation-style: "K&R"