VE.C

LIB3/SECURE/MASTER/VE.C · 680 B

From the archive nm4dos.zip

Download the archive   « Back to the archive contents

/*
 * Function name:   valid_exec
 * Description:     Checks if a certain 'program' has the right to use exec()
 * Arguments:       name: Name of the 'program' that attempts to use exec()
 *                        Note that this is different from file_name(),
 *                        Programname is what 'function_exists' returns.
 *                  NOTE, the absence of a leading slash in the name.
 * Returns:         True if exec() is allowed.
 */
int     valid_exec( string name )
{
    TB( "Name is: " + name + "\n" );
    TB( "filename is: " + file_name( previous_object() ) + "\n" );
    if( name == "secure/login.c" )
	return 1;

    return 0;
}				/* valid_exec() */

Site Stats

Snippets: 1791
Codebases: 571