263 |
} *ProcInfo_T; |
} *ProcInfo_T; |
264 |
|
|
265 |
/** |
/** |
266 |
* Defines a command with ARGMAX optional arguments. The arguments |
* Defines a Command with ARGMAX optional arguments. The arguments |
267 |
* array must be NULL terminated and the first entry is the program |
* array must be NULL terminated and the first entry is the program |
268 |
* itself. |
* itself. In addition, a user and group may be set for the Command |
269 |
|
* which means that the Command should run as a certain user and with |
270 |
|
* certain group. Finally, a Command_T object may contain a set of |
271 |
|
* environment variables to be set before the Command is started. |
272 |
*/ |
*/ |
273 |
typedef struct mycommand { |
typedef struct mycommand { |
274 |
char *arg[ARGMAX]; /**< Program with arguments */ |
char *arg[ARGMAX]; /**< Program with arguments */ |
275 |
int length; /**< The length of the arguments array */ |
int length; /**< The length of the arguments array */ |
276 |
|
int has_uid; /**< TRUE if a new uid is defined for this Command */ |
277 |
|
uid_t uid; /**< The user id to switch to when running this Command */ |
278 |
|
int has_gid; /**< TRUE if a new gid is defined for this Command */ |
279 |
|
gid_t gid; /**< The group id to switch to when running this Command */ |
280 |
|
char *env[ARGMAX]; /**< Environment variables to be set for Command */ |
281 |
} *Command_T; |
} *Command_T; |
282 |
|
|
283 |
/** Defines process data */ |
/** Defines process data */ |