29.01.2013 Views

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

gpfs_putacl() Subroutine<br />

Name<br />

gpfs_putacl() – Restores the access control information for a <strong>GPFS</strong> file.<br />

Library<br />

<strong>GPFS</strong> Library (libgpfs.a for AIX, libgpfs.so for Linux)<br />

Synopsis<br />

#include <br />

int gpfs_putacl(char *pathname, int flags, void *aclP)<br />

Description<br />

The gpfs_putacl() subroutine together with the gpfs_getacl() subroutine is intended for use by a backup<br />

program to save (gpfs_getacl()) <strong>and</strong> restore (gpfs_putacl()) the ACL information for the file.<br />

Notes:<br />

1. The use of gpfs_fgetattrs() <strong>and</strong> gpfs_fputattrs() is preferred.<br />

2. You must have write access to the file.<br />

3. Compile any program that uses this subroutine with the -lgpfs flag from the following library:<br />

v libgpfs.a for AIX<br />

v libgpfs.so for Linux<br />

Parameters<br />

pathname Path name of the file for which the ACLs is to be set.<br />

flags Consists of one of these values:<br />

0 Indicates that the aclP parameter is to be mapped with the<br />

gpfs_opaque_acl_t struct.<br />

The gpfs_opaque_acl_t struct should be used by backup <strong>and</strong> restore<br />

programs.<br />

<strong>GPFS</strong>_PUTACL_STRUCT<br />

Indicates that the aclP parameter is to be mapped with the gpfs_acl_t<br />

struct.<br />

The gpfs_acl_t struct is provided for applications that need to change the<br />

ACL.<br />

aclP Pointer to a buffer mapped by the structure gpfs_opaque_acl_t or gpfs_acl_t, depending<br />

on the value of flags.<br />

This is where the ACL data is stored, <strong>and</strong> should be the result of a previous invocation of<br />

gpfs_getacl().<br />

Exit status<br />

If the gpfs_putacl() subroutine is successful, it returns a value of 0.<br />

If the gpfs_putacl() subroutine is unsuccessful, it returns a value of -1 <strong>and</strong> sets the global error variable<br />

errno to indicate the nature of the error.<br />

Chapter 9. <strong>GPFS</strong> programming interfaces 335

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!