Oracle iPlanet Web Proxy Server 4.0.14 NSAPI Developer's Guide

util_can_exec

UNIX Only

The util_can_exec function checks that a specified file can be executed, returning either a 1 (executable) or a 0. The function checks whether the file can be executed by the user with the given user and group ID.

Use this function before executing a program using the exec system call.

Syntax

int util_can_exec(struct stat *finfo, uid_t uid, gid_t gid);

Returns

1 if the file is executable, or 0 if the file is not executable.

Parameters

stat *finfo is the stat structure associated with a file.

uid_t uid is the UNIX user ID.

gid_t gid is the UNIX group ID. Together with uid, this value determines the permissions of the UNIX user.

See Also

util_env_create, util_getline, util_hostname