.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
.P
-.BI "long syscall(SYS_keyctl, KEYCTL_UPDATE, unsigned long " arg2 ,
-.BI " unsigned long " arg3 ", unsigned long " arg4 );
+.BI "long syscall(SYS_keyctl, KEYCTL_UPDATE, key_serial_t " key ,
+.BI " void " payload [. size "], size_t " size );
.fi
.SH DESCRIPTION
-.TP
-.BR KEYCTL_UPDATE " (since Linux 2.6.10)"
Update a key's data payload.
-.IP
-The
-.I arg2
-argument (cast to
-.IR key_serial_t )
+.P
+.I key
specifies the ID of the key to be updated.
-The
-.I arg3
-argument (cast to
-.IR "void\ *" )
+.I payload
points to the new payload and
-.I arg4
-(cast to
-.IR size_t )
+.I size
contains the new payload size in bytes.
-.IP
+.P
The caller must have
.I write
permission on the key specified and the key type must support updating.
-.IP
-A negatively instantiated key (see the description of
-.BR KEYCTL_REJECT )
+.P
+A negatively instantiated key
+(see
+.BR KEYCTL_REJECT (2const))
can be positively instantiated with this operation.
-.IP
-The
-.I arg5
-argument is ignored.
-.IP
-This operation is exposed by
-.I libkeyutils
-via the function
-.BR keyctl_update (3).
.SH RETURN VALUE
On success,
0 is returned.
is set to indicate the error.
.SH ERRORS
.TP
-.B EOPNOTSUPP
-.I operation
-was
-.B KEYCTL_UPDATE
-and the key type does not support updating.
+The key type does not support updating.
.SH VERSIONS
A wrapper is provided in the
.I libkeyutils