This file is indexed.

/usr/include/pcp/pmdaroot.h is in libpcp-pmda3-dev 4.0.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*
 * Copyright (c) 2013-2015 Red Hat.
 * Copyright (c) 1995,2005 Silicon Graphics, Inc.  All Rights Reserved.
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 * License for more details.
 */
#ifndef PCP_PMDAROOT_H
#define PCP_PMDAROOT_H

#ifdef __cplusplus
extern "C" {
#endif

/*
 * Internal PDU exchange details for elevated privilege operations.
 * Only PMCD and some very specific PMDAs need to know about this.
 */
#define ROOT_PDU_VERSION1	1
#define ROOT_PDU_VERSION2	2
#define ROOT_PDU_VERSION	ROOT_PDU_VERSION2

#define PDUROOT_INFO		0x9000
#define PDUROOT_HOSTNAME_REQ	0x9001
#define PDUROOT_HOSTNAME	0x9002
#define PDUROOT_PROCESSID_REQ	0x9003
#define PDUROOT_PROCESSID	0x9004
#define PDUROOT_CGROUPNAME_REQ	0x9005
#define PDUROOT_CGROUPNAME	0x9006
#define PDUROOT_STARTPMDA_REQ	0x9007
#define PDUROOT_STARTPMDA	0x9008
#define PDUROOT_STOPPMDA_REQ	0x9009
#define PDUROOT_STOPPMDA	0x900a
/*#define PDUROOT_SASLAUTH_REQ	0x900b*/
/*#define PDUROOT_SASLAUTH	0x900c*/

typedef enum {
    PDUROOT_FLAG_HOSTNAME	= (1<<0),
    PDUROOT_FLAG_PROCESSID	= (1<<1),
    PDUROOT_FLAG_CGROUPNAME	= (1<<2),
} __pmdaRootServerFeature;

typedef struct {
    int		type;
    int		length;
    int		status;
    int		version;
} __pmdaRootPDUHdr;

typedef struct {
    __pmdaRootPDUHdr	hdr;
    int			features;
    int			zeroed;
} __pmdaRootPDUInfo;

/*
 * Common PDU for container operations
 * (PID, host and cgroup name requests and responses).
 */
typedef struct {
    __pmdaRootPDUHdr	hdr;
    int			pid;
    int			namelen;
    char		name[MAXPATHLEN];	/* max possible size */
} __pmdaRootPDUContainer;

/*
 * PDUs requesting pmdaroot start and stop PMDAs on behalf of
 * an unprivileged PMCD parent process.
 */
#define MAXPMDALEN	64			/* max label length */

typedef struct {
    __pmdaRootPDUHdr	hdr;
    int			pid;			/* out: process ID */
    int			infd;			/* out: process stdin */
    int			outfd;			/* out: process stdout */
    int			ipctype;		/* in: socket/pipe */
    int			namelen;		/* in: name length */
    int			argslen;		/* in: args length */
    char		name[MAXPMDALEN];	/* in: process label */
    char		args[MAXPATHLEN];	/* in: process args */
} __pmdaRootPDUStart;

typedef struct {
    __pmdaRootPDUHdr	hdr;
    int			pid;			/* process identifier */
    int			code;			/* waitpid exit status */
    int			force;			/* terminate don't wait */
    int			zeroed;
} __pmdaRootPDUStop;

PMDA_CALL extern int __pmdaSendRootPDUInfo(int, int, int);
PMDA_CALL extern int __pmdaRecvRootPDUInfo(int, int *, int *);
PMDA_CALL extern int __pmdaSendRootPDUContainer(int, int, int, const char *, int, int);
PMDA_CALL extern int __pmdaRecvRootPDUContainer(int, int, void *, int);
PMDA_CALL extern int __pmdaDecodeRootPDUContainer(void *, int, int *, char *, int);
PMDA_CALL extern int __pmdaSendRootPDUStartReq(int, int, const char *, int, const char*, int);
PMDA_CALL extern int __pmdaRecvRootPDUStartReq(int, void *, int);
PMDA_CALL extern int __pmdaSendRootPDUStart(int, int, int, int, const char *, int, int);
PMDA_CALL extern int __pmdaRecvRootPDUStart(int, void *, int);
PMDA_CALL extern int __pmdaDecodeRootPDUStart(void *, int, int *, int *, int *, int *, char *, int, char*, int);
PMDA_CALL extern int __pmdaSendRootPDUStop(int, int, int, int, int, int);
PMDA_CALL extern int __pmdaRecvRootPDUStop(int, int, void *, int);
PMDA_CALL extern int __pmdaDecodeRootPDUStop(void *, int, int *, int *, int *);

#ifdef __cplusplus
}
#endif

#endif /* PCP_PMDAROOT_H */