Movatterモバイル変換


[0]ホーム

URL:


man7.org > Linux >man-pages

Linux/UNIX system programming training


KEYCTL_DESCRIBE(2const) — Linux manual page

NAME |LIBRARY |SYNOPSIS |DESCRIPTION |RETURN VALUE |VERSIONS |STANDARDS |HISTORY |SEE ALSO |COLOPHON

KEYCTL_DESCRIBE(2const)KEYCTL_DESCRIBE(2const)

NAME        top

       KEYCTL_DESCRIBE - describe a key

LIBRARY        top

       Standard C library (libc,-lc)

SYNOPSIS        top

#include <linux/keyctl.h>/* Definition ofKEY*constants */#include <sys/syscall.h>/* Definition ofSYS_*constants */#include <unistd.h>long syscall(size_t size;SYS_keyctl, KEYCTL_DESCRIBE, key_serial_tkey,chardesc[_Nullablesize], size_tsize);

DESCRIPTION        top

       Obtain a string describing the attributes of a specified key.       The ID of the key to be described is specified inkey.  The       descriptive string is returned in the buffer pointed to bydesc;size specifies the size of that buffer in bytes.       The key must grant the callerview permission.       The returned string is null-terminated and contains the following       information about the key:type;uid;gid;perm;description       In the above,type anddescription are strings,uid andgid are       decimal strings, andperm is a hexadecimal permissions mask.  The       descriptive string is written with the following format:           %s;%d;%d;%08x;%sNote: the intention is that the descriptive string should beextensible in future kernel versions.In particular, thedescription field will not contain semicolons; it should be parsed       by working backwards from the end of the string to find the last       semicolon.  This allows future semicolon-delimited fields to be       inserted in the descriptive string in the future.       Writing to the buffer is attempted only whendesc is non-NULL and       the specified buffer size is large enough to accept the       descriptive string (including the terminating null byte).  In       order to determine whether the buffer size was too small, check to       see if the return value of the operation is greater thansize.

RETURN VALUE        top

       On success, the size of the description (including the terminating       null byte), irrespective of the provided buffer size.       On error, -1 is returned, anderrno is set to indicate the error.

VERSIONS        top

       A wrapper is provided in thelibkeyutils library:keyctl_describe(3).

STANDARDS        top

       Linux.

HISTORY        top

       Linux 2.6.10.

SEE ALSO        top

keyctl(2),keyctl_describe(3),keyctl_describe_alloc(3)

COLOPHON        top

       This page is part of theman-pages (Linux kernel and C library       user-space interface documentation) project.  Information about       the project can be found at        ⟨https://www.kernel.org/doc/man-pages/⟩.  If you have a bug report       for this manual page, see       ⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩.       This page was obtained from the tarball man-pages-6.15.tar.gz       fetched from       ⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on       2025-08-11.  If you discover any rendering problems in this HTML       version of the page, or you believe there is a better or more up-       to-date source for the page, or you have corrections or       improvements to the information in this COLOPHON (which isnot       part of the original manual page), send a mail to       man-pages@man7.orgLinux man-pages 6.15            2025-06-28KEYCTL_DESCRIBE(2const)

Pages that refer to this page:keyctl(2)KEYCTL_SETPERM(2const)



HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface.

For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere.

Hosting byjambit GmbH.

Cover of TLPI


[8]ページ先頭

©2009-2025 Movatter.jp