File: userinfo.h

package info (click to toggle)
bindfs 1.8-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,504 kB
  • ctags: 148
  • sloc: sh: 8,955; ansic: 1,388; ruby: 120; makefile: 56
file content (27 lines) | stat: -rw-r--r-- 595 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
    This program can be distributed under the terms of the GNU GPL.
    See the file COPYING.

    Author: Martin P�rtel <martin.partel@gmail.com>
*/

#ifndef INC_BINDFS_USERINFO_H
#define INC_BINDFS_USERINFO_H

#include <config.h>

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <pwd.h>
#include <grp.h>

/* Misc. reentrant helpers for handling user data.
   Return non-zero on success/true and 0 on failure/false. */

int user_uid(const char *username, uid_t *ret);
int group_gid(const char *groupname, gid_t *ret);

int user_belongs_to_group(uid_t uid, gid_t gid);

#endif