Toms Homepage
  Home    Downloads    Your Account    Forums  
  Create an account
Modules
· Home
· Games
· My Gallery
· PHP Manual
· PHP-Nuke HOWTO
· Web Links
· Your Account
 
Who's Online
Welcome, Anonymous
Nickname

Password

Security Code
Security Code
Type Security Code


(Register)

Membership:
Latest: WyattMcke
New Today: 566
New Yesterday: 619
Overall: 44038

People Online:
Visitors: 99
Members: 8
Total: 107

Online Now:
COM EdwinaRoe
 toonifttata
COM LinaRodma
COM NiklasBra
COM OllieAdam
 Belpantanny
COM AlishaCor
 AlfredGen
 
xattr_get

xattr_get

(no version information, might be only in CVS)

xattr_get --  Get an extended attribute

Description

string xattr_get ( string filename, string name [, int flags] )

This function gets the value of an extended attribute of a file.

Extended attributes have two different namespaces: user and root namespace. User namespace is available for all users while root namespace is available only for user with root privileges. xattr operates on user namespace by default, but you can change that using flags argument.

Parameters

filename

The file from which we get the attribute.

name

The name of the attribute.

flags

Table 1. Supported xattr flags

XATTR_DONTFOLLOW Do not follow the symbolic link but operate on symbolic link itself.
XATTR_ROOT Set attribute in root (trusted) namespace. Requires root privileges.



Return Values

Returns a string containing the value or FALSE if the attribute doesn't exist.

Examples

Example 1. Checks if system administrator has signed the file

<?php
$file
= '/usr/local/sbin/some_binary';
$signature = xattr_get($file, 'Root signature', XATTR_ROOT);

/* ... check if $signature is valid ... */

?>


All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2004 by Tom Nitzschner.
Web site engine code is Copyright © 2003 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.107 Seconds

:: VereorLCARS phpbb2 style by Vereor :: PHP-Nuke theme by www.nukemods.com ::