summaryrefslogtreecommitdiffstats
path: root/lib/librpc/secure_rpc/demo/whoami.x
blob: 041cd0a678ef0cfd181aff2c0133d010cc8bcf15 (plain)
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
28
29
30
31
32
33
/* @(#)whoami.x	2.2 88/08/22 4.0 RPCSRC */

const WHOAMI_NGROUPS = 16;

typedef string  name<MAXNETNAMELEN>;

struct remote_identity {
    bool authenticated;     /* TRUE if the server authenticates us */
    name remote_username;   /* login name */
    name remote_realname;   /* gcos-field name (long name) */
    int uid;
    int gid;
    int gids<WHOAMI_NGROUPS>;
};

program WHOAMI {
    version WHOAMI_V1 {
        /*
         * Report on the server's notion of the client's identity.
         * Will respond to AUTH_DES only.
         */
        remote_identity
        WHOAMI_IASK(void) = 1;
        /*
         * Return server's netname. AUTH_NONE is okay.
         * This routine allows this server to be started under any uid,
         * and the client can ask it its netname for use in authdes_create().
         */
        name
        WHOAMI_WHORU(void) = 2;

    } = 1;
} = 80955;
OpenPOWER on IntegriCloud