~ubuntu-branches/ubuntu/warty/openafs/warty

« back to all changes in this revision

Viewing changes to src/afs/DUX/osi_misc.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2004-01-10 16:37:33 UTC
  • Revision ID: james.westby@ubuntu.com-20040110163733-jvr0n1uahshlb1uu
Tags: upstream-1.2.11
ImportĀ upstreamĀ versionĀ 1.2.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2000, International Business Machines Corporation and others.
 
3
 * All Rights Reserved.
 
4
 * 
 
5
 * This software has been released under the terms of the IBM Public
 
6
 * License.  For details, see the LICENSE file in the top-level source
 
7
 * directory or online at http://www.openafs.org/dl/license10.html
 
8
 */
 
9
 
 
10
/*
 
11
 * Implements:
 
12
 * afs_suser
 
13
 */
 
14
 
 
15
#include <afsconfig.h>
 
16
#include "../afs/param.h"
 
17
 
 
18
RCSID("$Header: /afs/sipb.mit.edu/project/openafs/debian/cvs/openafs/src/afs/DUX/osi_misc.c,v 1.1.1.4 2001/07/14 22:19:37 hartmans Exp $");
 
19
 
 
20
#include "../afs/sysincludes.h" /* Standard vendor system headers */
 
21
#include "../afs/afsincludes.h" /* Afs-based standard headers */
 
22
 
 
23
/*
 
24
 * afs_suser() returns true if the caller is superuser, false otherwise.
 
25
 *
 
26
 * Note that it must NOT set errno.
 
27
 */
 
28
 
 
29
afs_suser() {
 
30
    int error;
 
31
 
 
32
    if ((error = suser(u.u_cred, &u.u_acflag)) == 0) {
 
33
        return(1);
 
34
    }
 
35
    return(0);
 
36
}