Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140715161657.GA9928@port70.net>
Date: Tue, 15 Jul 2014 18:16:57 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: Brent Cook <busterb@...il.com>
Cc: musl@...ts.openwall.com, beck@...nbsd.org,
	Brent Cook <brent@...ndary.com>
Subject: Re: [PATCH] implement issetugid(2) (v3)

* 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

>  #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.