Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <92601D2A-1EC2-4870-A11B-C35D7C812E58@gmail.com>
Date: Tue, 15 Jul 2014 11:29:36 -0500
From: Brent Cook <busterb@...il.com>
To: Szabolcs Nagy <nsz@...t70.net>
Cc: musl@...ts.openwall.com,
 beck@...nbsd.org
Subject: Re: [PATCH] implement issetugid(2) (v3)

On Jul 15, 2014, at 11:16 AM, Szabolcs Nagy <nsz@...t70.net> wrote:

> * Brent Cook <busterb@...il.com> [2014-07-15 15:40:46 +0000]:
>> --- a/include/unistd.h
>> +++ b/include/unistd.h
>> @@ -192,6 +192,10 @@ int euidaccess(const char *, int);
>> int eaccess(const char *, int);
>> #endif
>> 
>> +#ifdef _BSD_SOURCE
>> +int issetugid(void);
>> +#endif
>> +
> 
> in musl _BSD_SOURCE is a subset of _GNU_SOURCE
> so it should be used with || defined(_GNU_SOURCE)
> 
> (_GNU_SOURCE actually means 'everything' instead of
> 'gnu', and _BSD_SOURCE means 'default', but they are
> very close to the usual gnu/bsd feature set applications
> expect
> 
> there is no distict bsd/gnu/posix behaviour in musl, an
> interface always behaves the same way if it is visible)
> 
> otherwise the patch looks good

OK, I’ll just move it to the existing block for that and resend.

>> #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
>> #define lseek64 lseek
>> #define pread64 pread
>> diff --git a/src/unistd/issetugid.c b/src/unistd/issetugid.c
>> new file mode 100644
>> index 0000000..6ffd930
>> --- /dev/null
>> +++ b/src/unistd/issetugid.c
>> @@ -0,0 +1,7 @@
>> +#include <unistd.h>
>> +#include "libc.h"
>> +
>> +int issetugid(void)
>> +{
>> +	return libc.secure;
>> +}
>> -- 
>> 1.9.1

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.