Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

files(4)

create_file_securely(3)  —  Subroutines

NAME

create_file_securely − Create a file in the authentication database  (Enhanced Security)

LIBRARY

Security library (libsecurity.a)

SYNOPSIS

#include <security.h>
#include <prot.h>

int create_file_securely(
char ∗file,
int decibels,
char ∗purpose);

PARAMETERS

∗fileThe file parameter is the pathname to create. 

decibels
The decibels parameter is AUTH_SILENT, AUTH_LIMITED, or AUTH_VERBOSE.  Using AUTH_SILENT blocks signals.  The AUTH_LIMITED constant allows a limited amount of dialog.  Using AUTH_VERBOSE specifies that the routine should try to wait until the file can be created (up to 100 tries, 1 second apart).  The values for decibels are as follows:

0AUTH_SILENT

1AUTH_LIMITED

2AUTH_VERBOSE

purpose
The purpose parameter is passed to auditd when a file cannot be created.  It is a tag for the audit log. 

DESCRIPTION

The create_file_securely routine creates a file as specified in the authentication database.  It is more flexible than coding the discretionary attributes of the file, and a further assurance that the file being created is in accordance with security concerns. 

RETURN VALUES

The create_file_securely routine returns the following values:

0CFS_GOOD_RETURN

1CFS_CAN_NOT_OPEN_FILE

2CFS_NO_FILE_CONTROL_ENTRY

3FS_CAN_NOT_CHG_MODE

4CFS_CAN_NOT_CHG_OWNER_GROUP

FILES

/etc/auth/system/files
The file control database.

RELATED INFORMATION

Files: files(4)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026