Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 303579 | Differences between
and this patch

Collapse All | Expand All

(-)daemon.c.orig (+13 lines)
Lines 14-19 Link Here
14
#define NI_MAXSERV 32
14
#define NI_MAXSERV 32
15
#endif
15
#endif
16
16
17
#ifdef __INTERIX
18
#include <interix/security.h>
19
#endif
20
17
static int log_syslog;
21
static int log_syslog;
18
static int verbose;
22
static int verbose;
19
static int reuseaddr;
23
static int reuseaddr;
Lines 914-923 Link Here
914
		die("unable to allocate any listen sockets on host %s port %u",
918
		die("unable to allocate any listen sockets on host %s port %u",
915
		    listen_addr, listen_port);
919
		    listen_addr, listen_port);
916
920
921
#ifdef __INTERIX
922
	if (pass)
923
		if (setuser(pass->pw_name, NULL, SU_COMPLETE) != 0)
924
			die("cannot drop privileges");
925
	if (gid && (gid != getgid()))
926
		if (setgid(gid) != 0)
927
			die("cannot setgid()");
928
#else
917
	if (pass && gid &&
929
	if (pass && gid &&
918
	    (initgroups(pass->pw_name, gid) || setgid (gid) ||
930
	    (initgroups(pass->pw_name, gid) || setgid (gid) ||
919
	     setuid(pass->pw_uid)))
931
	     setuid(pass->pw_uid)))
920
		die("cannot drop privileges");
932
		die("cannot drop privileges");
933
#endif
921
934
922
	return service_loop(socknum, socklist);
935
	return service_loop(socknum, socklist);
923
}
936
}
(-)git-compat-util.h.orig (+13 lines)
Lines 93-99 Link Here
93
#include <utime.h>
93
#include <utime.h>
94
#ifndef __MINGW32__
94
#ifndef __MINGW32__
95
#include <sys/wait.h>
95
#include <sys/wait.h>
96
#ifdef __INTERIX
97
#include <poll.h>
98
#else
96
#include <sys/poll.h>
99
#include <sys/poll.h>
100
#endif
97
#include <sys/socket.h>
101
#include <sys/socket.h>
98
#include <sys/ioctl.h>
102
#include <sys/ioctl.h>
99
#ifndef NO_SYS_SELECT_H
103
#ifndef NO_SYS_SELECT_H
Lines 105-110 Link Here
105
#include <netdb.h>
109
#include <netdb.h>
106
#include <pwd.h>
110
#include <pwd.h>
107
#include <inttypes.h>
111
#include <inttypes.h>
112
#ifdef __INTERIX
113
#include <stdint.h>
114
#endif
108
#if defined(__CYGWIN__)
115
#if defined(__CYGWIN__)
109
#undef _XOPEN_SOURCE
116
#undef _XOPEN_SOURCE
110
#include <grp.h>
117
#include <grp.h>
Lines 448-457 Link Here
448
#define ST_CTIME_NSEC(st) ((unsigned int)((st).st_ctimespec.tv_nsec))
455
#define ST_CTIME_NSEC(st) ((unsigned int)((st).st_ctimespec.tv_nsec))
449
#define ST_MTIME_NSEC(st) ((unsigned int)((st).st_mtimespec.tv_nsec))
456
#define ST_MTIME_NSEC(st) ((unsigned int)((st).st_mtimespec.tv_nsec))
450
#else
457
#else
458
#ifdef __INTERIX
459
/* or is this just a general bug? */
460
#define ST_CTIME_NSEC(st) ((unsigned int)((st).st_ctime.tv_nsec))
461
#define ST_MTIME_NSEC(st) ((unsigned int)((st).st_mtime.tv_nsec))
462
#else
451
#define ST_CTIME_NSEC(st) ((unsigned int)((st).st_ctim.tv_nsec))
463
#define ST_CTIME_NSEC(st) ((unsigned int)((st).st_ctim.tv_nsec))
452
#define ST_MTIME_NSEC(st) ((unsigned int)((st).st_mtim.tv_nsec))
464
#define ST_MTIME_NSEC(st) ((unsigned int)((st).st_mtim.tv_nsec))
453
#endif
465
#endif
454
#endif
466
#endif
467
#endif
455
468
456
#ifdef UNRELIABLE_FSTAT
469
#ifdef UNRELIABLE_FSTAT
457
#define fstat_is_reliable() 0
470
#define fstat_is_reliable() 0

Return to bug 303579