define this and that to answer warnings
This commit is contained in:
parent
5dbcea700e
commit
9639caf117
@ -1,6 +1,7 @@
|
|||||||
#include <plan9.h>
|
#include <plan9.h>
|
||||||
#include <fcall.h>
|
#include <fcall.h>
|
||||||
#include <u9fs.h>
|
#include <u9fs.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* return whether the user is authenticated.
|
* return whether the user is authenticated.
|
||||||
|
2
plan9.h
2
plan9.h
@ -9,6 +9,8 @@
|
|||||||
/* magic to get 64-bit stat on Linux, maybe others */
|
/* magic to get 64-bit stat on Linux, maybe others */
|
||||||
#define _FILE_OFFSET_BITS 64
|
#define _FILE_OFFSET_BITS 64
|
||||||
|
|
||||||
|
#define _DEFAULT_SOURCE 1 /* also for ruserok */
|
||||||
|
|
||||||
#ifdef sgi
|
#ifdef sgi
|
||||||
#define _BSD_TYPES 1 /* for struct timeval */
|
#define _BSD_TYPES 1 /* for struct timeval */
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
|
4
u9fs.c
4
u9fs.c
@ -1430,7 +1430,9 @@ groupchange(User *u, User *g, char **ep)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
setreuid(0,0);
|
if(setreuid(0, 0) < 0){
|
||||||
|
/* can't get super-user, other calls will fail */
|
||||||
|
}
|
||||||
if(setregid(-1, g->id) < 0){
|
if(setregid(-1, g->id) < 0){
|
||||||
fprint(2, "setegid(%s/%d) failed in groupchange\n", g->name, g->id);
|
fprint(2, "setegid(%s/%d) failed in groupchange\n", g->name, g->id);
|
||||||
*ep = strerror(errno);
|
*ep = strerror(errno);
|
||||||
|
Loading…
Reference in New Issue
Block a user