int revoke ( Path)
char *Path;
The revoke subroutine revokes access to a file by all processes.
All accesses to the file are revoked. Subsequent attempts to access the file using a file descriptor established before the revoke subroutine fail and cause the process to receive a return value of -1, and the errno global variable is set to EBADF.
A process can revoke access to a file only if its effective user ID is the same as the file owner ID, or if the calling process is privileged.
Note: The revoke subroutine has no affect on subsequent attempts to open the file. To assure exclusive access to the file, the caller should change the access mode of the file before issuing the revoke subroutine. Currently the revoke subroutine works only on terminal devices. The chmod subroutine changes file access modes.
Path | Path name of the file for which access is to be revoked. |
Upon successful completion, the revoke subroutine returns a value of 0.
If the revoke subroutine fails, a value of -1 returns and the errno global variable is set to indicate the error.
The revoke subroutine
fails if any of the following are true:
This subroutine is part of Base Operating System (BOS) Runtime.
The chmod subroutine, frevoke subroutine.
List of Security and Auditing Subroutines and Subroutines Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.