put back setting uid and gid to -1 if they are not available.

This commit is contained in:
christos 2015-05-28 01:01:37 +00:00
parent 6e17a5c33f
commit e4b9f99a89
1 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: bl.c,v 1.25 2015/05/27 22:37:13 christos Exp $ */
/* $NetBSD: bl.c,v 1.26 2015/05/28 01:01:37 christos Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -33,7 +33,7 @@
#endif
#include <sys/cdefs.h>
__RCSID("$NetBSD: bl.c,v 1.25 2015/05/27 22:37:13 christos Exp $");
__RCSID("$NetBSD: bl.c,v 1.26 2015/05/28 01:01:37 christos Exp $");
#include <sys/param.h>
#include <sys/types.h>
@ -483,6 +483,10 @@ bl_recv(bl_t b)
bi->bi_type = ub.bl.bl_type;
bi->bi_slen = ub.bl.bl_salen;
bi->bi_ss = ub.bl.bl_ss;
#ifndef CRED_MESSAGE
bi->bi_uid = -1;
bi->bi_gid = -1;
#endif
strlcpy(bi->bi_msg, ub.bl.bl_data, MIN(sizeof(bi->bi_msg),
((size_t)rlen - sizeof(ub.bl) + 1)));
return bi;