}
static void
-keyctl_update_key(struct tcb *tcp, key_serial_t id, long addr, long len)
+keyctl_update_key(struct tcb *tcp, key_serial_t id, unsigned long addr,
+ unsigned long len)
{
print_keyring_serial_number(id);
tprints(", ");
}
static void
-keyctl_read_key(struct tcb *tcp, key_serial_t id, long addr, long len,
- bool has_nul)
+keyctl_read_key(struct tcb *tcp, key_serial_t id, unsigned long addr,
+ unsigned long len, bool has_nul)
{
if (entering(tcp)) {
print_keyring_serial_number(id);
if (syserror(tcp))
printaddr(addr);
else {
- long rval = tcp->u_rval > len ?
- len : tcp->u_rval;
+ unsigned long rval = (tcp->u_rval >= 0) &&
+ ((unsigned long) tcp->u_rval > len) ? len :
+ (unsigned long) tcp->u_rval;
printstr_ex(tcp, addr, rval, has_nul ?
QUOTE_OMIT_TRAILING_0 : 0);
}
}
static void
-keyctl_keyring_search(struct tcb *tcp, key_serial_t id1, long addr1,
- long addr2, key_serial_t id2)
+keyctl_keyring_search(struct tcb *tcp, key_serial_t id1, unsigned long addr1,
+ unsigned long addr2, key_serial_t id2)
{
print_keyring_serial_number(id1);
tprints(", ");
}
static void
-keyctl_chown_key(struct tcb *tcp, key_serial_t id, int user, int group)
+keyctl_chown_key(struct tcb *tcp, key_serial_t id, unsigned user,
+ unsigned group)
{
print_keyring_serial_number(id);
printuid(", ", user);
}
static void
-keyctl_instantiate_key(struct tcb *tcp, key_serial_t id1, long addr,
- long len, key_serial_t id2)
+keyctl_instantiate_key(struct tcb *tcp, key_serial_t id1, unsigned long addr,
+ unsigned long len, key_serial_t id2)
{
print_keyring_serial_number(id1);
tprints(", ");
static void
keyctl_instantiate_key_iov(struct tcb *tcp, key_serial_t id1,
- long addr, long len, key_serial_t id2)
+ unsigned long addr, unsigned long len,
+ key_serial_t id2)
{
print_keyring_serial_number(id1);
tprints(", ");
}
static void
-keyctl_get_persistent(struct tcb *tcp, int uid, key_serial_t id)
+keyctl_get_persistent(struct tcb *tcp, unsigned uid, key_serial_t id)
{
printuid("", uid);
tprints(", ");
}
static void
-print_dh_params(struct tcb *tcp, long addr)
+print_dh_params(struct tcb *tcp, unsigned long addr)
{
struct keyctl_dh_params params;
}
static void
-keyctl_dh_compute(struct tcb *tcp, long params, long buf, long len)
+keyctl_dh_compute(struct tcb *tcp, unsigned long params, unsigned long buf,
+ unsigned long len)
{
if (entering(tcp)) {
print_dh_params(tcp, params);
if (syserror(tcp)) {
printaddr(buf);
} else {
- long rval = tcp->u_rval > len ? len : tcp->u_rval;
+ unsigned long rval = (tcp->u_rval >= 0) &&
+ ((unsigned long) tcp->u_rval > len) ? len :
+ (unsigned long) tcp->u_rval;
printstr(tcp, buf, rval);
}
tprintf(", %lu", len);