Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2015-07-13 20:01:08 +01:00
2 changed files with 7 additions and 6 deletions

View File

@ -354,6 +354,7 @@ client_send_identify(int flags)
{
const char *s;
char **ss;
size_t sslen;
int fd;
pid_t pid;
@ -378,8 +379,11 @@ client_send_identify(int flags)
pid = getpid();
client_write_one(MSG_IDENTIFY_CLIENTPID, -1, &pid, sizeof pid);
for (ss = environ; *ss != NULL; ss++)
client_write_one(MSG_IDENTIFY_ENVIRON, -1, *ss, strlen(*ss) + 1);
for (ss = environ; *ss != NULL; ss++) {
sslen = strlen(*ss) + 1;
if (sslen <= MAX_IMSGSIZE - IMSG_HEADER_SIZE)
client_write_one(MSG_IDENTIFY_ENVIRON, -1, *ss, sslen);
}
client_write_one(MSG_IDENTIFY_DONE, -1, NULL, 0);