.TH "meta" 3elektra "Sun May 29 2016" "Version 0.8.14" "Elektra" \" -*- nroff -*- .ad l .nh .SH NAME meta \- Meta Data proposal+compatibility .PP Meta data proposal+compatibility methods\&. .SS "Functions" .in +1c .ti -1c .RI "const char * \fBkeyOwner\fP (const Key *key)" .br .RI "\fIReturn a pointer to the real internal \fCkey\fP owner\&. \fP" .ti -1c .RI "ssize_t \fBkeyGetOwnerSize\fP (const Key *key)" .br .RI "\fIReturn the size of the owner of the Key with concluding 0\&. \fP" .ti -1c .RI "ssize_t \fBkeyGetOwner\fP (const Key *key, char *returnedOwner, size_t maxSize)" .br .RI "\fIReturn the owner of the key\&. \fP" .ti -1c .RI "ssize_t \fBkeySetOwner\fP (Key *key, const char *newOwner)" .br .RI "\fISet the owner of a key\&. \fP" .ti -1c .RI "const char * \fBkeyComment\fP (const Key *key)" .br .RI "\fIReturn a pointer to the real internal \fCkey\fP comment\&. \fP" .ti -1c .RI "ssize_t \fBkeyGetCommentSize\fP (const Key *key)" .br .RI "\fICalculates number of bytes needed to store a key comment, including final NULL\&. \fP" .ti -1c .RI "ssize_t \fBkeyGetComment\fP (const Key *key, char *returnedComment, size_t maxSize)" .br .RI "\fIGet the key comment\&. \fP" .ti -1c .RI "ssize_t \fBkeySetComment\fP (Key *key, const char *newComment)" .br .RI "\fISet a comment for a key\&. \fP" .ti -1c .RI "uid_t \fBkeyGetUID\fP (const Key *key)" .br .RI "\fIGet the user ID of a key\&. \fP" .ti -1c .RI "int \fBkeySetUID\fP (Key *key, uid_t uid)" .br .RI "\fISet the user ID of a key\&. \fP" .ti -1c .RI "gid_t \fBkeyGetGID\fP (const Key *key)" .br .RI "\fIGet the group ID of a key\&. \fP" .ti -1c .RI "int \fBkeySetGID\fP (Key *key, gid_t gid)" .br .RI "\fISet the group ID of a key\&. \fP" .ti -1c .RI "int \fBkeySetDir\fP (Key *key)" .br .RI "\fISet mode so that key will be recognized as directory\&. \fP" .ti -1c .RI "mode_t \fBkeyGetMode\fP (const Key *key)" .br .RI "\fIReturn the key mode permissions\&. \fP" .ti -1c .RI "int \fBkeySetMode\fP (Key *key, mode_t mode)" .br .RI "\fISet the key mode permissions\&. \fP" .ti -1c .RI "time_t \fBkeyGetATime\fP (const Key *key)" .br .RI "\fIGet last time the key data was read from disk\&. \fP" .ti -1c .RI "int \fBkeySetATime\fP (Key *key, time_t atime)" .br .RI "\fIUpdate the atime information for a key\&. \fP" .ti -1c .RI "time_t \fBkeyGetMTime\fP (const Key *key)" .br .RI "\fIGet last modification time of the key on disk\&. \fP" .ti -1c .RI "int \fBkeySetMTime\fP (Key *key, time_t mtime)" .br .RI "\fIUpdate the mtime information for a key\&. \fP" .ti -1c .RI "time_t \fBkeyGetCTime\fP (const Key *key)" .br .RI "\fIGet last time the key metadata was changed from disk\&. \fP" .ti -1c .RI "int \fBkeySetCTime\fP (Key *key, time_t ctime)" .br .RI "\fIUpdate the ctime information for a key\&. \fP" .ti -1c .RI "int \fBelektraKeyCmpOrder\fP (const Key *ka, const Key *kb)" .br .RI "\fICompare the order metadata of two keys\&. \fP" .in -1c .SH "Detailed Description" .PP Meta data proposal+compatibility methods\&. In versions before Elektra 0\&.8 only meta data as listed here was available\&. Now any meta data can be added\&. These API methods are implementations of the 0\&.7 API using 0\&.8 meta data\&. .PP Additionally, new suggestions can be made here\&. .PP It is planned that these methods will be generated from doc/METADATA\&.ini and moved to a separate library\&. Currently, you should better avoid the methods and directly use \fBmetainfo \fP instead\&. .SH "Function Documentation" .PP .SS "int elektraKeyCmpOrder (const Key * ka, const Key * kb)" .PP Compare the order metadata of two keys\&. .PP \fBReturns:\fP .RS 4 a number less than, equal to or greater than zero if the order of k1 is found, respectively, to be less than, to match, or be greater than the order of k2\&. If one key is NULL, but the other isn't, the key which is not NULL is considered to be greater\&. If both keys are NULL, they are considered to be equal\&. If one key does have an order metadata but the other has not, the key with the metadata is considered greater\&. If no key has metadata, they are considered to be equal\&. .RE .PP \fBParameters:\fP .RS 4 \fIka\fP key to compare with .br \fIkb\fP other key to compare with .RE .PP .SS "const char* keyComment (const Key * key)" .PP Return a pointer to the real internal \fCkey\fP comment\&. This is a much more efficient version of \fBkeyGetComment()\fP and you should use it if you are responsible enough to not mess up things\&. You are not allowed to change anything in the memory region the returned pointer points to\&. .PP \fBkeyComment()\fP returns '' when there is no keyComment\&. The reason is .PP .nf 1 key=keyNew(0); 2 keySetComment(key,""); 3 keyComment(key); // you would expect "" here 4 keyDel(key); .fi .PP .PP See \fBkeySetComment()\fP for more information on comments\&. .PP \fBNote:\fP .RS 4 Note that the Key structure keeps its own size field that is calculated by library internal calls, so to avoid inconsistencies, you must never use the pointer returned by \fBkeyComment()\fP method to set a new value\&. Use \fBkeySetComment()\fP instead\&. .RE .PP \fBParameters:\fP .RS 4 \fIkey\fP the key object to work with .RE .PP \fBReturns:\fP .RS 4 a pointer to the internal managed comment .RE .PP \fBReturn values:\fP .RS 4 \fI''\fP when there is no comment .br \fI0\fP on NULL pointer .RE .PP \fBSee also:\fP .RS 4 \fBkeyGetCommentSize()\fP for size and \fBkeyGetComment()\fP as alternative .RE .PP .SS "time_t keyGetATime (const Key * key)" .PP Get last time the key data was read from disk\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. .RE .PP .PP Every \fBkdbGet()\fP might update the access time of a key\&. You get information when the key was read the last time from the database\&. .PP You will get 0 when the key was not read already\&. .PP Beware that multiple copies of keys with \fBkeyDup()\fP might have different atimes because you \fBkdbGet()\fP one, but not the other\&. You can use this information to decide which key is the latest\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP Key to get information from\&. .RE .PP \fBReturns:\fP .RS 4 the time you got the key with \fBkdbGet()\fP .RE .PP \fBReturn values:\fP .RS 4 \fI0\fP on key that was never \fBkdbGet()\fP .br \fI(time_t)-1\fP on NULL pointer .RE .PP \fBSee also:\fP .RS 4 \fBkeySetATime()\fP .PP \fBkdbGet()\fP .RE .PP .SS "ssize_t keyGetComment (const Key * key, char * returnedComment, size_t maxSize)" .PP Get the key comment\&. .SH "Comments" .PP A Key comment is description for humans what this key is for\&. It may be a textual explanation of valid values, when and why a user or administrator changed the key or any other text that helps the user or administrator related to that key\&. .PP Don't depend on a comment in your program\&. A user is always allowed to remove or change it in any way he wants to\&. But you are allowed or even encouraged to always show the content of the comment to the user and allow him to change it\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP the key object to work with .br \fIreturnedComment\fP pre-allocated memory to copy the comments to .br \fImaxSize\fP number of bytes that will fit returnedComment .RE .PP \fBReturns:\fP .RS 4 the number of bytes actually copied to \fCreturnedString\fP, including final NULL .RE .PP \fBReturn values:\fP .RS 4 \fI1\fP if the string is empty .br \fI-1\fP on NULL pointer .br \fI-1\fP if maxSize is 0, not enough to store the comment or when larger then SSIZE_MAX .RE .PP \fBSee also:\fP .RS 4 \fBkeyGetCommentSize()\fP, \fBkeySetComment()\fP .RE .PP .SS "ssize_t keyGetCommentSize (const Key * key)" .PP Calculates number of bytes needed to store a key comment, including final NULL\&. Use this method to know to size for allocated memory to retrieve a key comment\&. .PP See \fBkeySetComment()\fP for more information on comments\&. .PP For an empty key name you need one byte to store the ending NULL\&. For that reason 1 is returned\&. .PP .PP .nf 1 char *buffer; 2 buffer = malloc (keyGetCommentSize (key)); 3 // use this buffer to store the comment 4 // pass keyGetCommentSize (key) for maxSize .fi .PP .PP \fBParameters:\fP .RS 4 \fIkey\fP the key object to work with .RE .PP \fBReturns:\fP .RS 4 number of bytes needed .RE .PP \fBReturn values:\fP .RS 4 \fI1\fP if there is no comment .br \fI-1\fP on NULL pointer .RE .PP \fBSee also:\fP .RS 4 \fBkeyGetComment()\fP, \fBkeySetComment()\fP .RE .PP .SS "time_t keyGetCTime (const Key * key)" .PP Get last time the key metadata was changed from disk\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. .RE .PP .PP You will get 0 when the key was not read already\&. .PP Any changed field in metadata will influence the ctime of a key\&. .PP This time is not updated if only value or comment are changed\&. .PP Not changed keys will not update this time, even after \fBkdbSet()\fP\&. .PP It is possible that other keys written to disc influence this time if the backend is not grained enough\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP Key to get information from\&. .RE .PP \fBSee also:\fP .RS 4 \fBkeySetCTime()\fP .RE .PP \fBReturn values:\fP .RS 4 \fI(time_t)-1\fP on NULL pointer .RE .PP \fBReturns:\fP .RS 4 the metadata change time .RE .PP .SS "gid_t keyGetGID (const Key * key)" .PP Get the group ID of a key\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. .RE .PP .SH "GID" .PP The group ID is a unique identification for every group present on a system\&. Keys will belong to root (0) as long as you did not get their real GID with \fBkdbGet()\fP\&. .PP Unlike UID users might change their group\&. This makes it possible to share configuration between some users\&. .PP A fresh key will have (gid_t)-1 also known as the group nogroup\&. It means that the key is not related to a group ID at the moment\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP the key object to work with .RE .PP \fBReturns:\fP .RS 4 the system's GID of the key .RE .PP \fBReturn values:\fP .RS 4 \fI(gid_t)-1\fP on NULL key or currently unknown ID .RE .PP \fBSee also:\fP .RS 4 \fBkeySetGID()\fP, \fBkeyGetUID()\fP .RE .PP .SS "mode_t keyGetMode (const Key * key)" .PP Return the key mode permissions\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. .RE .PP .PP Default is 0664 (octal) for keys and 0775 for directory keys which used \fBkeySetDir()\fP\&. .PP The defaults are defined with the macros KDB_FILE_MODE and KDB_DIR_MODE\&. .PP For more information about the mode permissions see \fBModes\fP\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP the key object to work with .RE .PP \fBReturns:\fP .RS 4 mode permissions of the key .RE .PP \fBReturn values:\fP .RS 4 \fIKDB_FILE_MODE\fP as defaults .br \fI(mode_t)-1\fP on NULL pointer .RE .PP \fBSee also:\fP .RS 4 \fBkeySetMode()\fP .RE .PP .SS "time_t keyGetMTime (const Key * key)" .PP Get last modification time of the key on disk\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. .RE .PP .PP You will get 0 when the key was not read already\&. .PP Everytime you change value or comment and \fBkdbSet()\fP the key the mtime will be updated\&. When you \fBkdbGet()\fP the key, the atime is set appropriate\&. .PP Not changed keys may not even passed to kdbSet_backend() so it will not update this time, even after \fBkdbSet()\fP\&. .PP It is possible that other keys written to disc influence this time if the backend is not grained enough\&. .PP If you add or remove a key the key thereunder in the hierarchy will update the mtime if written with \fBkdbSet()\fP to disc\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP Key to get information from\&. .RE .PP \fBSee also:\fP .RS 4 \fBkeySetMTime()\fP .RE .PP \fBReturns:\fP .RS 4 the last modification time .RE .PP \fBReturn values:\fP .RS 4 \fI(time_t)-1\fP on NULL pointer .RE .PP .SS "ssize_t keyGetOwner (const Key * key, char * returnedOwner, size_t maxSize)" .PP Return the owner of the key\&. .IP "\(bu" 2 Given \fCuser:someuser/\fP\&.\&.\&.\&.\&. return \fCsomeuser\fP .IP "\(bu" 2 Given \fCuser:some\&.user/\fP\&.\&.\&.\&. return \fCsome\&.user\fP .IP "\(bu" 2 Given \fCuser/\fP\&.\&.\&.\&. return the current user .PP .PP Only \fCuser/\fP\&.\&.\&. keys have a owner\&. For \fCsystem/\fP\&.\&.\&. keys (that doesn't have a key owner) an empty string ('') is returned\&. .PP Although usually the same, the owner of a key is not related to its UID\&. Owner are related to WHERE the key is stored on disk, while UIDs are related to mode controls of a key\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP the object to work with .br \fIreturnedOwner\fP a pre-allocated space to store the owner .br \fImaxSize\fP maximum number of bytes that fit returned .RE .PP \fBReturns:\fP .RS 4 number of bytes written to buffer .RE .PP \fBReturn values:\fP .RS 4 \fI1\fP if there is no owner .br \fI-1\fP on NULL pointers .br \fI-1\fP when maxSize is 0, larger than SSIZE_MAX or too small for ownername .RE .PP \fBSee also:\fP .RS 4 \fBkeySetName()\fP, \fBkeySetOwner()\fP, \fBkeyOwner()\fP, \fBkeyGetFullName()\fP .RE .PP .SS "ssize_t keyGetOwnerSize (const Key * key)" .PP Return the size of the owner of the Key with concluding 0\&. The returned number can be used to allocate a string\&. 1 will returned on an empty owner to store the concluding 0 on using \fBkeyGetOwner()\fP\&. .PP .PP .nf 1 char * buffer; 2 buffer = malloc (keyGetOwnerSize (key)); 3 // use buffer and keyGetOwnerSize (key) for maxSize .fi .PP .PP \fBNote:\fP .RS 4 that -1 might be returned on null pointer, so when you directly allocate afterwards its best to check if you will pass a null pointer before\&. .RE .PP \fBParameters:\fP .RS 4 \fIkey\fP the key object to work with .RE .PP \fBReturns:\fP .RS 4 number of bytes .RE .PP \fBReturn values:\fP .RS 4 \fI1\fP if there is no owner .br \fI-1\fP on NULL pointer .RE .PP \fBSee also:\fP .RS 4 \fBkeyGetOwner()\fP .RE .PP .SS "uid_t keyGetUID (const Key * key)" .PP Get the user ID of a key\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. .RE .PP .SH "UID" .PP The user ID is a unique identification for every user present on a system\&. Keys will belong to root (0) as long as you did not get their real UID with \fBkdbGet()\fP\&. .PP Although usually the same, the UID of a key is not related to its owner\&. .PP A fresh key will have no UID\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP the key object to work with .RE .PP \fBReturns:\fP .RS 4 the system's UID of the key .RE .PP \fBReturn values:\fP .RS 4 \fI(uid_t)-1\fP on NULL key .RE .PP \fBSee also:\fP .RS 4 \fBkeyGetGID()\fP, \fBkeySetUID()\fP, \fBkeyGetOwner()\fP .RE .PP .SS "const char* keyOwner (const Key * key)" .PP Return a pointer to the real internal \fCkey\fP owner\&. This is a much more efficient version of \fBkeyGetOwner()\fP and you should use it if you are responsible enough to not mess up things\&. You are not allowed to modify the returned string in any way\&. If you need a copy of the string, consider to use \fBkeyGetOwner()\fP instead\&. .PP \fBkeyOwner()\fP returns '' when there is no keyOwner\&. The reason is .PP .nf 1 key=keyNew(0); 2 keySetOwner(key,""); 3 keyOwner(key); // you would expect "" here 4 keySetOwner(key,"system"); 5 keyOwner(key); // you would expect "" here .fi .PP .PP \fBNote:\fP .RS 4 Note that the Key structure keeps its own size field that is calculated by library internal calls, so to avoid inconsistencies, you must never use the pointer returned by \fBkeyOwner()\fP method to set a new value\&. Use \fBkeySetOwner()\fP instead\&. .RE .PP \fBParameters:\fP .RS 4 \fIkey\fP the key object to work with .RE .PP \fBReturns:\fP .RS 4 a pointer to internal owner .RE .PP \fBReturn values:\fP .RS 4 \fI''\fP when there is no (a empty) owner .br \fI0\fP iff key is a NULL pointer .RE .PP \fBSee also:\fP .RS 4 \fBkeyGetOwnerSize()\fP for the size of the string with concluding 0 .PP \fBkeyGetOwner()\fP, \fBkeySetOwner()\fP .PP \fBkeyName()\fP for name without owner .PP \fBkeyGetFullName()\fP for name with owner .RE .PP .SS "int keySetATime (Key * key, time_t atime)" .PP Update the atime information for a key\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. .RE .PP .PP When you do manual sync of keys you might also update the atime to make them indistinguishable\&. .PP It can also be useful if you work with keys not using a keydatabase\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP The Key object to work with .br \fIatime\fP The new access time for the key .RE .PP \fBReturn values:\fP .RS 4 \fI0\fP on success .br \fI-1\fP on NULL pointer .RE .PP \fBSee also:\fP .RS 4 \fBkeyGetATime()\fP .RE .PP .SS "ssize_t keySetComment (Key * key, const char * newComment)" .PP Set a comment for a key\&. A key comment is like a configuration file comment\&. See \fBkeySetComment()\fP for more information\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP the key object to work with .br \fInewComment\fP the comment, that can be freed after this call\&. .RE .PP \fBReturns:\fP .RS 4 the number of bytes actually saved including final NULL .RE .PP \fBReturn values:\fP .RS 4 \fI0\fP when the comment was freed (newComment NULL or empty string) .br \fI-1\fP on NULL pointer or memory problems .RE .PP \fBSee also:\fP .RS 4 \fBkeyGetComment()\fP .RE .PP .SS "int keySetCTime (Key * key, time_t ctime)" .PP Update the ctime information for a key\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. .RE .PP .PP \fBParameters:\fP .RS 4 \fIkey\fP The Key object to work with .br \fIctime\fP The new change metadata time for the key .RE .PP \fBReturn values:\fP .RS 4 \fI0\fP on success .br \fI-1\fP on NULL pointer .RE .PP \fBSee also:\fP .RS 4 \fBkeyGetCTime()\fP .RE .PP .SS "int keySetDir (Key * key)" .PP Set mode so that key will be recognized as directory\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. .RE .PP .PP The function will add all executable bits\&. .PP .IP "\(bu" 2 Mode 0200 will be translated to 0311 .IP "\(bu" 2 Mode 0400 will be translated to 0711 .IP "\(bu" 2 Mode 0664 will be translated to 0775 .PP .PP The macro KDB_DIR_MODE (defined to 0111) will be used for that\&. .PP The executable bits show that child keys are allowed and listable\&. There is no way to have child keys which are not listable for anyone, but it is possible to restrict listing the keys to the owner only\&. .PP .IP "\(bu" 2 Mode 0000 means that it is a key not read or writable to anyone\&. .IP "\(bu" 2 Mode 0111 means that it is a directory not read or writable to anyone\&. But it is recognized as directory to anyone\&. .PP .PP For more about mode see \fBkeySetMode()\fP\&. .PP It is not possible to access keys below a not executable key\&. If a key is not writeable and executable \fBkdbSet()\fP will fail to access the keys below\&. If a key is not readable and executable \fBkdbGet()\fP will fail to access the keys below\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP the key to set permissions to be recognized as directory\&. .RE .PP \fBReturn values:\fP .RS 4 \fI0\fP on success .br \fI-1\fP on NULL pointer .RE .PP \fBSee also:\fP .RS 4 \fBkeySetMode()\fP .RE .PP .SS "int keySetGID (Key * key, gid_t gid)" .PP Set the group ID of a key\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. .RE .PP .PP See \fBGID\fP for more information about group IDs\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP the key object to work with .br \fIgid\fP is the group ID .RE .PP \fBReturn values:\fP .RS 4 \fI0\fP on success .br \fI-1\fP on NULL key .RE .PP \fBSee also:\fP .RS 4 \fBkeyGetGID()\fP, \fBkeySetUID()\fP .RE .PP .SS "int keySetMode (Key * key, mode_t mode)" .PP Set the key mode permissions\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. It is only a mapping to keySetMeta(key, 'mode', str) which should be prefered\&. .RE .PP .PP The mode consists of 9 individual bits for mode permissions\&. In the following explanation the octal notation with leading zero will be used\&. .PP Default is 0664 (octal) for keys and 0775 for directory keys which used \fBkeySetDir()\fP\&. .PP The defaults are defined with the macros KDB_FILE_MODE and KDB_DIR_MODE\&. .PP \fBNote:\fP .RS 4 libelektra 0\&.7\&.0 only allows 0775 (directory keys) and 0664 (other keys)\&. More will be added later in a sense of the description below\&. .RE .PP .SH "Modes" .PP 0000 is the most restrictive mode\&. No user might read, write or execute the key\&. .PP Reading the key means to get the value by \fBkdbGet()\fP\&. .PP Writing the key means to set the value by \fBkdbSet()\fP\&. .PP Execute the key means to make a step deeper in the hierarchy\&. But you must be able to read the key to be able to list the keys below\&. See also \fBkeySetDir()\fP in that context\&. But you must be able to write the key to be able to add or remove keys below\&. .PP 0777 is the most relaxing mode\&. Every user is allowed to read, write and execute the key, if he is allowed to execute and read all keys below\&. .PP 0700 allows every action for the current user, identified by the uid\&. See \fBkeyGetUID()\fP and \fBkeySetUID()\fP\&. .PP To be more specific for the user the single bits can elect the mode for read, write and execute\&. 0100 only allows executing which gives the information that it is a directory for that user, but not accessable\&. 0200 only allows reading\&. This information may be combined to 0300, which allows execute and reading of the directory\&. Last 0400 decides about the writing permissions\&. .PP The same as above is also valid for the 2 other octal digits\&. 0070 decides about the group permissions, in that case full access\&. Groups are identified by the gid\&. See \fBkeyGetGID()\fP and \fBkeySetGID()\fP\&. In that example everyone with a different uid, but the gid of the the key, has full access\&. .PP 0007 decides about the world permissions\&. This is taken into account when neighter the uid nor the gid matches\&. So that example would allow everyone with a different uid and gid of that key gains full access\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP the key to set mode permissions .br \fImode\fP the mode permissions .RE .PP \fBReturn values:\fP .RS 4 \fI0\fP on success .br \fI-1\fP on NULL key .RE .PP \fBSee also:\fP .RS 4 \fBkeyGetMode()\fP .RE .PP .SS "int keySetMTime (Key * key, time_t mtime)" .PP Update the mtime information for a key\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. .RE .PP .PP \fBParameters:\fP .RS 4 \fIkey\fP The Key object to work with .br \fImtime\fP The new modification time for the key .RE .PP \fBReturn values:\fP .RS 4 \fI0\fP on success .RE .PP \fBSee also:\fP .RS 4 \fBkeyGetMTime()\fP .RE .PP .SS "ssize_t keySetOwner (Key * key, const char * newOwner)" .PP Set the owner of a key\&. A owner is a name of a system user related to a UID\&. The owner decides on which location on the disc the key goes\&. .PP A private copy is stored, so the passed parameter can be freed after the call\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP the key object to work with .br \fInewOwner\fP the string which describes the owner of the key .RE .PP \fBReturns:\fP .RS 4 the number of bytes actually saved including final NULL .RE .PP \fBReturn values:\fP .RS 4 \fI1\fP when owner is freed (by setting 0 or '') .br \fI-1\fP on null pointer or memory problems .RE .PP \fBSee also:\fP .RS 4 \fBkeySetName()\fP, \fBkeyGetOwner()\fP, \fBkeyGetFullName()\fP .RE .PP .SS "int keySetUID (Key * key, uid_t uid)" .PP Set the user ID of a key\&. .PP \fBDeprecated\fP .RS 4 This API is obsolete\&. .RE .PP .PP See \fBUID\fP for more information about user IDs\&. .PP \fBParameters:\fP .RS 4 \fIkey\fP the key object to work with .br \fIuid\fP the user ID to set .RE .PP \fBReturn values:\fP .RS 4 \fI0\fP on success .br \fI-1\fP on NULL key or conversion error .RE .PP \fBSee also:\fP .RS 4 \fBkeySetGID()\fP, \fBkeyGetUID()\fP, \fBkeyGetOwner()\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Elektra from the source code\&.