GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PRIV_POPEN (3)

NAME

priv_popen, priv_pclose - process IO

CONTENTS

Synopsis
Description
Errors
Files
Bugs
Author

SYNOPSIS

#include <privman.h>

FILE *priv_popen(const char *command, const char * type, const char *user,); int priv_pclose(FILE *stream);

DESCRIPTION

The priv_popen() function opens a process by creating a pipe, forking, and invoking the shell. The type argument may specify only reading or writing, not both. The resulting stream is correspondingly read-only or write-only.

The command argument is a pointer to a null-terminated string containing a shell command line. The command is bassed to /bin/sh using the -c flag; interpretation, if any, is performed by the shell. The mode argument is a pointer to a null-terminated string which must be either ‘r’ for reading or ‘w’ for writing.

See the man page for popen(3) for more details, as this method parallels popen(3).

The priv_pclose function waits for the associated process to terminate, and returns the exit status of the command as returned by wait4.

RETURN VALUE

On success, a pointer to a valid stream is returned. On error, NULL is returned and errno is set appropriately.

The priv_pclose function returns -1 if wait4 returns an error, or some other error is detected.

ERRORS

See popen(3) and pclose(3) for more detail. In addition to the errors listed there, priv_popen may set errno to EPERM if the user is not listed in an ‘‘run_as’’ configuration directive, or if the ‘‘allow_as’’ configuration primitive is not set to true. See privman_conf(5) for more details.

FILES

${prefix}/etc/privman.d/appname
The application’s configuration file. See privman_conf(5)

BUGS

The file must

AUTHOR

Network Associates. Send email to <privman@nailabs.com>

SEE ALSO

priv_daemon(3) priv_execve(3) priv_fopen(3) priv_fork(3) priv_wait4(3) priv_init(3) privman_conf(5) priv_open(3) priv_pam(3) priv_rerunas(3) priv_respawn_as(3) privman(7)
Search for    or go to Top of page |  Section 3 |  Main Index


Unix PRIV_POPEN (3) SEPTEMBER 2002

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.