Attributes Functions
[Libsmbclient]

Functions used to view or change file and directory attributes [詳細]

関数

int smbc_stat (const char *url, struct stat *st)
 Get information about a file or directory.
int smbc_fstat (int fd, struct stat *st)
 Get file information via an file descriptor.
int smbc_chmod (const char *url, mode_t mode)
 Change the permissions of a file.
int smbc_utimes (const char *url, struct timeval *tbuf)
 Change the last modification time on a file
int smbc_utime (const char *fname, struct utimbuf *utbuf)
 Change the last modification time on a file
int smbc_setxattr (const char *url, const char *name, const void *value, size_t size, int flags)
 Set extended attributes for a file.
int smbc_lsetxattr (const char *url, const char *name, const void *value, size_t size, int flags)
 Set extended attributes for a file.
int smbc_fsetxattr (int fd, const char *name, const void *value, size_t size, int flags)
 Set extended attributes for a file.
int smbc_getxattr (const char *url, const char *name, const void *value, size_t size)
 Get extended attributes for a file.
int smbc_lgetxattr (const char *url, const char *name, const void *value, size_t size)
 Get extended attributes for a file.
int smbc_fgetxattr (int fd, const char *name, const void *value, size_t size)
 Get extended attributes for a file.
int smbc_removexattr (const char *url, const char *name)
 Remove extended attributes for a file.
int smbc_lremovexattr (const char *url, const char *name)
 Remove extended attributes for a file.
int smbc_fremovexattr (int fd, const char *name)
 Remove extended attributes for a file.
int smbc_listxattr (const char *url, char *list, size_t size)
 List the supported extended attribute names associated with a file
int smbc_llistxattr (const char *url, char *list, size_t size)
 List the supported extended attribute names associated with a file The POSIX function which this maps to would act on a symbolic link rather than acting on what the symbolic link points to, but with no symbolic links in SMB file systems, this function is functionally identical to smbc_listxattr().
int smbc_flistxattr (int fd, char *list, size_t size)
 List the supported extended attribute names associated with a file

説明

Functions used to view or change file and directory attributes


関数

int smbc_stat ( const char *  url,
struct stat *  st 
)

Get information about a file or directory.

引数:
url The smb url to get information for
st pointer to a buffer that will be filled with standard Unix struct stat information.
戻り値:
0 on success, < 0 on error with errno set:
  • ENOENT A component of the path file_name does not exist.
  • EINVAL a NULL url was passed or smbc_init not called.
  • EACCES Permission denied.
  • ENOMEM Out of memory
  • ENOTDIR The target dir, url, is not a directory.
参照:
Unix stat()

libsmb_compat.c282 行で定義されています。

参照先 _SMBCCTX::statstatcont.

参照元 cb_select_child()tool_list().

00283 {
00284         return (statcont->stat)(statcont, url, st);
00285 }

int smbc_fstat ( int  fd,
struct stat *  st 
)

Get file information via an file descriptor.

引数:
fd Open file handle from smbc_open() or smbc_creat()
st pointer to a buffer that will be filled with standard Unix struct stat information.
戻り値:
EBADF filedes is bad.
  • EACCES Permission denied.
  • EBADF fd is not a valid file descriptor
  • EINVAL Problems occurred in the underlying routines or smbc_init not called.
  • ENOMEM Out of memory
参照:
smbc_stat(), Unix stat()

libsmb_compat.c287 行で定義されています。

参照先 find_fd()_SMBCCTX::fstatstatcont.

参照元 do_get()do_put()smb_download_dir()smb_download_file().

00288 {
00289         SMBCFILE * file = find_fd(fd);
00290         return (statcont->fstat)(statcont, file, st);
00291 }

int smbc_chmod ( const char *  url,
mode_t  mode 
)

Change the permissions of a file.

引数:
url The smb url of the file or directory to change permissions of
mode The permissions to set:
  • Put good explaination of permissions here!
戻り値:
0 on success, < 0 on error with errno set:
  • EPERM The effective UID does not match the owner of the file, and is not zero
  • ENOENT The file does not exist.
  • ENOMEM Insufficient was available.
  • ENOENT file or directory does not exist
TODO:
Actually implement this fuction?
TODO:
Are errno values complete and correct?

libsmb_compat.c293 行で定義されています。

参照先 _SMBCCTX::chmodstatcont.

00294 {
00295         return (statcont->chmod)(statcont, url, mode);
00296 }

int smbc_utimes ( const char *  url,
struct timeval *  tbuf 
)

Change the last modification time on a file

引数:
url The smb url of the file or directory to change the modification time of
tbuf A timeval structure which contains the desired modification time. NOTE: Only the tv_sec field is used. The tv_usec (microseconds) portion is ignored.
戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized
  • EPERM Permission was denied.

libsmb_compat.c298 行で定義されています。

参照先 statcont_SMBCCTX::utimes.

00299 {
00300         return (statcont->utimes)(statcont, fname, tbuf);
00301 }

int smbc_utime ( const char *  fname,
struct utimbuf *  utbuf 
)

Change the last modification time on a file

引数:
url The smb url of the file or directory to change the modification time of
utbuf A utimebuf structure which contains the desired modification time. NOTE: Although the structure contains an access time as well, the access time value is ignored.
戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized
  • ENOMEM No memory was available for internal needs
  • EPERM Permission was denied.

libsmb_compat.c304 行で定義されています。

参照先 statcont_SMBCCTX::utimes.

00305 {
00306         struct timeval tv[2];
00307 
00308         if (utbuf == NULL)
00309                 return (statcont->utimes)(statcont, fname, NULL);
00310 
00311         tv[0].tv_sec = utbuf->actime;
00312         tv[1].tv_sec = utbuf->modtime;
00313         tv[0].tv_usec = tv[1].tv_usec = 0;
00314 
00315         return (statcont->utimes)(statcont, fname, tv);
00316 }

int smbc_setxattr ( const char *  url,
const char *  name,
const void *  value,
size_t  size,
int  flags 
)

Set extended attributes for a file.

This is used for modifying a file's security descriptor (i.e. owner, group, and access control list)

引数:
url The smb url of the file or directory to set extended attributes for.
name The name of an attribute to be changed. Names are of one of the following forms:
system.nt_sec_desc.<attribute name>=""> system.nt_sec_desc.* system.nt_sec_desc.*+

where <attribute name>=""> is one of:

revision owner owner+ group group+ acl:<name or="" sid>=""> acl+:<name or="" sid>="">

In the forms "system.nt_sec_desc.*" and "system.nt_sec_desc.*+", the asterisk and plus signs are literal, i.e. the string is provided exactly as shown, and the value parameter should contain a complete security descriptor with name:value pairs separated by tabs, commas, or newlines (not spaces!).

The plus sign ('+') indicates that SIDs should be mapped to names. Without the plus sign, SIDs are not mapped; rather they are simply converted to a string format.

引数:
value The value to be assigned to the specified attribute name. This buffer should contain only the attribute value if the name was of the "system.nt_sec_desc.<attribute_name>" form. If the name was of the "system.nt_sec_desc.*" form then a complete security descriptor, with name:value pairs separated by tabs, commas, or newlines (not spaces!), should be provided in this value buffer. A complete security descriptor will contain one or more entries selected from the following:
REVISION:<revision number>=""> OWNER:<sid or="" name>=""> GROUP:<sid or="" name>=""> ACL:<sid or="" name>="">:<type>/<flags>/<mask>

The revision of the ACL specifies the internal Windows NT ACL revision for the security descriptor. If not specified it defaults to 1. Using values other than 1 may cause strange behaviour.

The owner and group specify the owner and group sids for the object. If the attribute name (either '*+' with a complete security descriptor, or individual 'owner+' or 'group+' attribute names) ended with a plus sign, the specified name is resolved to a SID value, using the server on which the file or directory resides. Otherwise, the value should be provided in SID-printable format as S-1-x-y-z, and is used directly. The <sid or="" name>=""> associated with the ACL: attribute should be provided similarly.

引数:
size The number of the bytes of data in the value buffer
flags A bit-wise OR of zero or more of the following: SMBC_XATTR_FLAG_CREATE - fail if the named attribute already exists SMBC_XATTR_FLAG_REPLACE - fail if the attribute does not already exist
If neither flag is specified, the specified attributes will be added or replace existing attributes of the same name, as necessary.

戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized or one of the parameters is not of a correct form
  • ENOMEM No memory was available for internal needs
  • EEXIST If the attribute already exists and the flag SMBC_XATTR_FLAG_CREAT was specified
  • ENOATTR If the attribute does not exist and the flag SMBC_XATTR_FLAG_REPLACE was specified
  • EPERM Permission was denied.
  • ENOTSUP The referenced file system does not support extended attributes
覚え書き:
Attribute names are compared in a case-insensitive fashion. All of the following are equivalent, although the all-lower-case name is the preferred format: system.nt_sec_desc.owner SYSTEM.NT_SEC_DESC.OWNER sYsTeM.nt_sEc_desc.owNER

libsmb_compat.c319 行で定義されています。

参照先 _SMBCCTX::setxattrstatcont.

00324 {
00325         return (statcont->setxattr)(statcont, fname, name, value, size, flags);
00326 }

int smbc_lsetxattr ( const char *  url,
const char *  name,
const void *  value,
size_t  size,
int  flags 
)

Set extended attributes for a file.

This is used for modifying a file's security descriptor (i.e. owner, group, and access control list). The POSIX function which this maps to would act on a symbolic link rather than acting on what the symbolic link points to, but with no symbolic links in SMB file systems, this function is functionally identical to smbc_setxattr().

引数:
url The smb url of the file or directory to set extended attributes for.
name The name of an attribute to be changed. Names are of one of the following forms:
system.nt_sec_desc.<attribute name>=""> system.nt_sec_desc.* system.nt_sec_desc.*+

where <attribute name>=""> is one of:

revision owner owner+ group group+ acl:<name or="" sid>=""> acl+:<name or="" sid>="">

In the forms "system.nt_sec_desc.*" and "system.nt_sec_desc.*+", the asterisk and plus signs are literal, i.e. the string is provided exactly as shown, and the value parameter should contain a complete security descriptor with name:value pairs separated by tabs, commas, or newlines (not spaces!).

The plus sign ('+') indicates that SIDs should be mapped to names. Without the plus sign, SIDs are not mapped; rather they are simply converted to a string format.

引数:
value The value to be assigned to the specified attribute name. This buffer should contain only the attribute value if the name was of the "system.nt_sec_desc.<attribute_name>" form. If the name was of the "system.nt_sec_desc.*" form then a complete security descriptor, with name:value pairs separated by tabs, commas, or newlines (not spaces!), should be provided in this value buffer. A complete security descriptor will contain one or more entries selected from the following:
REVISION:<revision number>=""> OWNER:<sid or="" name>=""> GROUP:<sid or="" name>=""> ACL:<sid or="" name>="">:<type>/<flags>/<mask>

The revision of the ACL specifies the internal Windows NT ACL revision for the security descriptor. If not specified it defaults to 1. Using values other than 1 may cause strange behaviour.

The owner and group specify the owner and group sids for the object. If the attribute name (either '*+' with a complete security descriptor, or individual 'owner+' or 'group+' attribute names) ended with a plus sign, the specified name is resolved to a SID value, using the server on which the file or directory resides. Otherwise, the value should be provided in SID-printable format as S-1-x-y-z, and is used directly. The <sid or="" name>=""> associated with the ACL: attribute should be provided similarly.

引数:
size The number of the bytes of data in the value buffer
flags A bit-wise OR of zero or more of the following: SMBC_XATTR_FLAG_CREATE - fail if the named attribute already exists SMBC_XATTR_FLAG_REPLACE - fail if the attribute does not already exist
If neither flag is specified, the specified attributes will be added or replace existing attributes of the same name, as necessary.

戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized or one of the parameters is not of a correct form
  • ENOMEM No memory was available for internal needs
  • EEXIST If the attribute already exists and the flag SMBC_XATTR_FLAG_CREAT was specified
  • ENOATTR If the attribute does not exist and the flag SMBC_XATTR_FLAG_REPLACE was specified
  • EPERM Permission was denied.
  • ENOTSUP The referenced file system does not support extended attributes
覚え書き:
Attribute names are compared in a case-insensitive fashion. All of the following are equivalent, although the all-lower-case name is the preferred format: system.nt_sec_desc.owner SYSTEM.NT_SEC_DESC.OWNER sYsTeM.nt_sEc_desc.owNER

libsmb_compat.c328 行で定義されています。

参照先 _SMBCCTX::setxattrstatcont.

00333 {
00334         return (statcont->setxattr)(statcont, fname, name, value, size, flags);
00335 }

int smbc_fsetxattr ( int  fd,
const char *  name,
const void *  value,
size_t  size,
int  flags 
)

Set extended attributes for a file.

This is used for modifying a file's security descriptor (i.e. owner, group, and access control list)

引数:
fd A file descriptor associated with an open file (as previously returned by smbc_open(), to get extended attributes for.
name The name of an attribute to be changed. Names are of one of the following forms:
system.nt_sec_desc.<attribute name>=""> system.nt_sec_desc.* system.nt_sec_desc.*+

where <attribute name>=""> is one of:

revision owner owner+ group group+ acl:<name or="" sid>=""> acl+:<name or="" sid>="">

In the forms "system.nt_sec_desc.*" and "system.nt_sec_desc.*+", the asterisk and plus signs are literal, i.e. the string is provided exactly as shown, and the value parameter should contain a complete security descriptor with name:value pairs separated by tabs, commas, or newlines (not spaces!).

The plus sign ('+') indicates that SIDs should be mapped to names. Without the plus sign, SIDs are not mapped; rather they are simply converted to a string format.

引数:
value The value to be assigned to the specified attribute name. This buffer should contain only the attribute value if the name was of the "system.nt_sec_desc.<attribute_name>" form. If the name was of the "system.nt_sec_desc.*" form then a complete security descriptor, with name:value pairs separated by tabs, commas, or newlines (not spaces!), should be provided in this value buffer. A complete security descriptor will contain one or more entries selected from the following:
REVISION:<revision number>=""> OWNER:<sid or="" name>=""> GROUP:<sid or="" name>=""> ACL:<sid or="" name>="">:<type>/<flags>/<mask>

The revision of the ACL specifies the internal Windows NT ACL revision for the security descriptor. If not specified it defaults to 1. Using values other than 1 may cause strange behaviour.

The owner and group specify the owner and group sids for the object. If the attribute name (either '*+' with a complete security descriptor, or individual 'owner+' or 'group+' attribute names) ended with a plus sign, the specified name is resolved to a SID value, using the server on which the file or directory resides. Otherwise, the value should be provided in SID-printable format as S-1-x-y-z, and is used directly. The <sid or="" name>=""> associated with the ACL: attribute should be provided similarly.

引数:
size The number of the bytes of data in the value buffer
flags A bit-wise OR of zero or more of the following: SMBC_XATTR_FLAG_CREATE - fail if the named attribute already exists SMBC_XATTR_FLAG_REPLACE - fail if the attribute does not already exist
If neither flag is specified, the specified attributes will be added or replace existing attributes of the same name, as necessary.

戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized or one of the parameters is not of a correct form
  • ENOMEM No memory was available for internal needs
  • EEXIST If the attribute already exists and the flag SMBC_XATTR_FLAG_CREAT was specified
  • ENOATTR If the attribute does not exist and the flag SMBC_XATTR_FLAG_REPLACE was specified
  • EPERM Permission was denied.
  • ENOTSUP The referenced file system does not support extended attributes
覚え書き:
Attribute names are compared in a case-insensitive fashion. All of the following are equivalent, although the all-lower-case name is the preferred format: system.nt_sec_desc.owner SYSTEM.NT_SEC_DESC.OWNER sYsTeM.nt_sEc_desc.owNER

libsmb_compat.c337 行で定義されています。

参照先 errnofind_fd()_SMBCFILE::fname_SMBCCTX::setxattrstatcont.

00342 {
00343         SMBCFILE * file = find_fd(fd);
00344         if (file == NULL) {
00345                 errno = EBADF;
00346                 return -1;
00347         }
00348         return (statcont->setxattr)(statcont, file->fname,
00349                                     name, value, size, flags);
00350 }

int smbc_getxattr ( const char *  url,
const char *  name,
const void *  value,
size_t  size 
)

Get extended attributes for a file.

引数:
url The smb url of the file or directory to get extended attributes for.
name The name of an attribute to be retrieved. Names are of one of the following forms:
system.nt_sec_desc.<attribute name>=""> system.nt_sec_desc.* system.nt_sec_desc.*+

where <attribute name>=""> is one of:

revision owner owner+ group group+ acl:<name or="" sid>=""> acl+:<name or="" sid>="">

In the forms "system.nt_sec_desc.*" and "system.nt_sec_desc.*+", the asterisk and plus signs are literal, i.e. the string is provided exactly as shown, and the value parameter will return a complete security descriptor with name:value pairs separated by tabs, commas, or newlines (not spaces!).

The plus sign ('+') indicates that SIDs should be mapped to names. Without the plus sign, SIDs are not mapped; rather they are simply converted to a string format.

引数:
value A pointer to a buffer in which the value of the specified attribute will be placed (unless size is zero).
size The size of the buffer pointed to by value. This parameter may also be zero, in which case the size of the buffer required to hold the attribute value will be returned, but nothing will be placed into the value buffer.
戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized or one of the parameters is not of a correct form
  • ENOMEM No memory was available for internal needs
  • EEXIST If the attribute already exists and the flag SMBC_XATTR_FLAG_CREAT was specified
  • ENOATTR If the attribute does not exist and the flag SMBC_XATTR_FLAG_REPLACE was specified
  • EPERM Permission was denied.
  • ENOTSUP The referenced file system does not support extended attributes

libsmb_compat.c352 行で定義されています。

参照先 _SMBCCTX::getxattrstatcont.

00356 {
00357         return (statcont->getxattr)(statcont, fname, name, value, size);
00358 }

int smbc_lgetxattr ( const char *  url,
const char *  name,
const void *  value,
size_t  size 
)

Get extended attributes for a file.

The POSIX function which this maps to would act on a symbolic link rather than acting on what the symbolic link points to, but with no symbolic links in SMB file systems, this function is functionally identical to smbc_getxattr().

引数:
url The smb url of the file or directory to get extended attributes for.
name The name of an attribute to be retrieved. Names are of one of the following forms:
system.nt_sec_desc.<attribute name>=""> system.nt_sec_desc.* system.nt_sec_desc.*+

where <attribute name>=""> is one of:

revision owner owner+ group group+ acl:<name or="" sid>=""> acl+:<name or="" sid>="">

In the forms "system.nt_sec_desc.*" and "system.nt_sec_desc.*+", the asterisk and plus signs are literal, i.e. the string is provided exactly as shown, and the value parameter will return a complete security descriptor with name:value pairs separated by tabs, commas, or newlines (not spaces!).

The plus sign ('+') indicates that SIDs should be mapped to names. Without the plus sign, SIDs are not mapped; rather they are simply converted to a string format.

引数:
value A pointer to a buffer in which the value of the specified attribute will be placed (unless size is zero).
size The size of the buffer pointed to by value. This parameter may also be zero, in which case the size of the buffer required to hold the attribute value will be returned, but nothing will be placed into the value buffer.
戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized or one of the parameters is not of a correct form
  • ENOMEM No memory was available for internal needs
  • EEXIST If the attribute already exists and the flag SMBC_XATTR_FLAG_CREAT was specified
  • ENOATTR If the attribute does not exist and the flag SMBC_XATTR_FLAG_REPLACE was specified
  • EPERM Permission was denied.
  • ENOTSUP The referenced file system does not support extended attributes

libsmb_compat.c360 行で定義されています。

参照先 _SMBCCTX::getxattrstatcont.

00364 {
00365         return (statcont->getxattr)(statcont, fname, name, value, size);
00366 }

int smbc_fgetxattr ( int  fd,
const char *  name,
const void *  value,
size_t  size 
)

Get extended attributes for a file.

引数:
fd A file descriptor associated with an open file (as previously returned by smbc_open(), to get extended attributes for.
name The name of an attribute to be retrieved. Names are of one of the following forms:
system.nt_sec_desc.<attribute name>=""> system.nt_sec_desc.* system.nt_sec_desc.*+

where <attribute name>=""> is one of:

revision owner owner+ group group+ acl:<name or="" sid>=""> acl+:<name or="" sid>="">

In the forms "system.nt_sec_desc.*" and "system.nt_sec_desc.*+", the asterisk and plus signs are literal, i.e. the string is provided exactly as shown, and the value parameter will return a complete security descriptor with name:value pairs separated by tabs, commas, or newlines (not spaces!).

The plus sign ('+') indicates that SIDs should be mapped to names. Without the plus sign, SIDs are not mapped; rather they are simply converted to a string format.

引数:
value A pointer to a buffer in which the value of the specified attribute will be placed (unless size is zero).
size The size of the buffer pointed to by value. This parameter may also be zero, in which case the size of the buffer required to hold the attribute value will be returned, but nothing will be placed into the value buffer.
戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized or one of the parameters is not of a correct form
  • ENOMEM No memory was available for internal needs
  • EEXIST If the attribute already exists and the flag SMBC_XATTR_FLAG_CREAT was specified
  • ENOATTR If the attribute does not exist and the flag SMBC_XATTR_FLAG_REPLACE was specified
  • EPERM Permission was denied.
  • ENOTSUP The referenced file system does not support extended attributes

libsmb_compat.c368 行で定義されています。

参照先 errnofind_fd()_SMBCFILE::fname_SMBCCTX::getxattrstatcont.

00372 {
00373         SMBCFILE * file = find_fd(fd);
00374         if (file == NULL) {
00375                 errno = EBADF;
00376                 return -1;
00377         }
00378         return (statcont->getxattr)(statcont, file->fname, name, value, size);
00379 }

int smbc_removexattr ( const char *  url,
const char *  name 
)

Remove extended attributes for a file.

This is used for modifying a file's security descriptor (i.e. owner, group, and access control list)

引数:
url The smb url of the file or directory to remove the extended attributes for.
name The name of an attribute to be removed. Names are of one of the following forms:
system.nt_sec_desc.<attribute name>=""> system.nt_sec_desc.* system.nt_sec_desc.*+

where <attribute name>=""> is one of:

revision owner owner+ group group+ acl:<name or="" sid>=""> acl+:<name or="" sid>="">

In the forms "system.nt_sec_desc.*" and "system.nt_sec_desc.*+", the asterisk and plus signs are literal, i.e. the string is provided exactly as shown, and the value parameter will return a complete security descriptor with name:value pairs separated by tabs, commas, or newlines (not spaces!).

The plus sign ('+') indicates that SIDs should be mapped to names. Without the plus sign, SIDs are not mapped; rather they are simply converted to a string format.

戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized
  • ENOMEM No memory was available for internal needs
  • EPERM Permission was denied.
  • ENOTSUP The referenced file system does not support extended attributes

libsmb_compat.c381 行で定義されています。

参照先 _SMBCCTX::removexattrstatcont.

00383 {
00384         return (statcont->removexattr)(statcont, fname, name);
00385 }

int smbc_lremovexattr ( const char *  url,
const char *  name 
)

Remove extended attributes for a file.

This is used for modifying a file's security descriptor (i.e. owner, group, and access control list) The POSIX function which this maps to would act on a symbolic link rather than acting on what the symbolic link points to, but with no symbolic links in SMB file systems, this function is functionally identical to smbc_removexattr().

引数:
url The smb url of the file or directory to remove the extended attributes for.
name The name of an attribute to be removed. Names are of one of the following forms:
system.nt_sec_desc.<attribute name>=""> system.nt_sec_desc.* system.nt_sec_desc.*+

where <attribute name>=""> is one of:

revision owner owner+ group group+ acl:<name or="" sid>=""> acl+:<name or="" sid>="">

In the forms "system.nt_sec_desc.*" and "system.nt_sec_desc.*+", the asterisk and plus signs are literal, i.e. the string is provided exactly as shown, and the value parameter will return a complete security descriptor with name:value pairs separated by tabs, commas, or newlines (not spaces!).

The plus sign ('+') indicates that SIDs should be mapped to names. Without the plus sign, SIDs are not mapped; rather they are simply converted to a string format.

戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized
  • ENOMEM No memory was available for internal needs
  • EPERM Permission was denied.
  • ENOTSUP The referenced file system does not support extended attributes

libsmb_compat.c387 行で定義されています。

参照先 _SMBCCTX::removexattrstatcont.

00389 {
00390         return (statcont->removexattr)(statcont, fname, name);
00391 }

int smbc_fremovexattr ( int  fd,
const char *  name 
)

Remove extended attributes for a file.

This is used for modifying a file's security descriptor (i.e. owner, group, and access control list)

引数:
fd A file descriptor associated with an open file (as previously returned by smbc_open(), to get extended attributes for.
name The name of an attribute to be removed. Names are of one of the following forms:
system.nt_sec_desc.<attribute name>=""> system.nt_sec_desc.* system.nt_sec_desc.*+

where <attribute name>=""> is one of:

revision owner owner+ group group+ acl:<name or="" sid>=""> acl+:<name or="" sid>="">

In the forms "system.nt_sec_desc.*" and "system.nt_sec_desc.*+", the asterisk and plus signs are literal, i.e. the string is provided exactly as shown, and the value parameter will return a complete security descriptor with name:value pairs separated by tabs, commas, or newlines (not spaces!).

The plus sign ('+') indicates that SIDs should be mapped to names. Without the plus sign, SIDs are not mapped; rather they are simply converted to a string format.

戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized
  • ENOMEM No memory was available for internal needs
  • EPERM Permission was denied.
  • ENOTSUP The referenced file system does not support extended attributes

libsmb_compat.c393 行で定義されています。

参照先 errnofind_fd()_SMBCFILE::fname_SMBCCTX::removexattrstatcont.

00395 {
00396         SMBCFILE * file = find_fd(fd);
00397         if (file == NULL) {
00398                 errno = EBADF;
00399                 return -1;
00400         }
00401         return (statcont->removexattr)(statcont, file->fname, name);
00402 }

int smbc_listxattr ( const char *  url,
char *  list,
size_t  size 
)

List the supported extended attribute names associated with a file

引数:
url The smb url of the file or directory to list the extended attributes for.
list A pointer to a buffer in which the list of attributes for the specified file or directory will be placed (unless size is zero).
size The size of the buffer pointed to by list. This parameter may also be zero, in which case the size of the buffer required to hold all of the attribute names will be returned, but nothing will be placed into the list buffer.
戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized
  • ENOMEM No memory was available for internal needs
  • EPERM Permission was denied.
  • ENOTSUP The referenced file system does not support extended attributes
覚え書き:
This function always returns all attribute names supported by NT file systems, regardless of wether the referenced file system supports extended attributes (e.g. a Windows 2000 machine supports extended attributes if NTFS is used, but not if FAT is used, and Windows 98 doesn't support extended attributes at all. Whether this is a feature or a bug is yet to be decided.

libsmb_compat.c404 行で定義されています。

参照先 _SMBCCTX::listxattrstatcont.

00407 {
00408         return (statcont->listxattr)(statcont, fname, list, size);
00409 }

int smbc_llistxattr ( const char *  url,
char *  list,
size_t  size 
)

List the supported extended attribute names associated with a file The POSIX function which this maps to would act on a symbolic link rather than acting on what the symbolic link points to, but with no symbolic links in SMB file systems, this function is functionally identical to smbc_listxattr().

引数:
url The smb url of the file or directory to list the extended attributes for.
list A pointer to a buffer in which the list of attributes for the specified file or directory will be placed (unless size is zero).
size The size of the buffer pointed to by list. This parameter may also be zero, in which case the size of the buffer required to hold all of the attribute names will be returned, but nothing will be placed into the list buffer.
戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized
  • ENOMEM No memory was available for internal needs
  • EPERM Permission was denied.
  • ENOTSUP The referenced file system does not support extended attributes
覚え書き:
This function always returns all attribute names supported by NT file systems, regardless of wether the referenced file system supports extended attributes (e.g. a Windows 2000 machine supports extended attributes if NTFS is used, but not if FAT is used, and Windows 98 doesn't support extended attributes at all. Whether this is a feature or a bug is yet to be decided.

libsmb_compat.c411 行で定義されています。

参照先 _SMBCCTX::listxattrstatcont.

00414 {
00415         return (statcont->listxattr)(statcont, fname, list, size);
00416 }

int smbc_flistxattr ( int  fd,
char *  list,
size_t  size 
)

List the supported extended attribute names associated with a file

引数:
fd A file descriptor associated with an open file (as previously returned by smbc_open(), to get extended attributes for.
list A pointer to a buffer in which the list of attributes for the specified file or directory will be placed (unless size is zero).
size The size of the buffer pointed to by list. This parameter may also be zero, in which case the size of the buffer required to hold all of the attribute names will be returned, but nothing will be placed into the list buffer.
戻り値:
0 on success, < 0 on error with errno set:
  • EINVAL The client library is not properly initialized
  • ENOMEM No memory was available for internal needs
  • EPERM Permission was denied.
  • ENOTSUP The referenced file system does not support extended attributes
覚え書き:
This function always returns all attribute names supported by NT file systems, regardless of wether the referenced file system supports extended attributes (e.g. a Windows 2000 machine supports extended attributes if NTFS is used, but not if FAT is used, and Windows 98 doesn't support extended attributes at all. Whether this is a feature or a bug is yet to be decided.

libsmb_compat.c418 行で定義されています。

参照先 errnofind_fd()_SMBCFILE::fname_SMBCCTX::listxattrstatcont.

00421 {
00422         SMBCFILE * file = find_fd(fd);
00423         if (file == NULL) {
00424                 errno = EBADF;
00425                 return -1;
00426         }
00427         return (statcont->listxattr)(statcont, file->fname, list, size);
00428 }


Sambaに対してSat Aug 29 21:24:39 2009に生成されました。  doxygen 1.4.7