Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 42647 Details for
Bug 69054
tftp-hpa works on macos
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to Makefile and tftpd.c
tftp-hpa.patch (text/plain), 1.72 KB, created by
Michal Suchanek
on 2004-10-26 12:33:39 UTC
(
hide
)
Description:
Patch to Makefile and tftpd.c
Filename:
MIME Type:
Creator:
Michal Suchanek
Created:
2004-10-26 12:33:39 UTC
Size:
1.72 KB
patch
obsolete
>diff -ur work/tftp-hpa-0.34/Makefile tftp-hpa-0.34/Makefile >--- work/tftp-hpa-0.34/Makefile Fri Mar 8 05:08:05 2002 >+++ tftp-hpa-0.34/Makefile Tue Oct 26 18:43:06 2004 >@@ -1,7 +1,7 @@ > # You can do "make SUB=blah" to make only a few, or edit here, or both > # You can also run make directly in the subdirs you want. > >-SUB = lib tftp tftpd >+SUB = lib tftpd > > %.build: MCONFIG acconfig.h version.h > $(MAKE) -C $(patsubst %.build, %, $@) >Only in tftp-hpa-0.34/: Makefile~ >diff -ur work/tftp-hpa-0.34/tftpd/tftpd.c tftp-hpa-0.34/tftpd/tftpd.c >--- work/tftp-hpa-0.34/tftpd/tftpd.c Sat Apr 12 08:54:58 2003 >+++ tftp-hpa-0.34/tftpd/tftpd.c Tue Oct 26 18:43:06 2004 >@@ -619,6 +619,7 @@ > > /* Set up the supplementary group access list if possible */ > /* /etc/group still need to be accessible at this point */ >+ if (! (getgid() && getegid() && getuid() && geteuid()) ) { /* root */ > #ifdef HAVE_INITGROUPS > setrv = initgroups(user, pw->pw_gid); > if ( setrv ) { >@@ -632,6 +633,7 @@ > } > #endif > #endif >+ } /* root */ > > /* Chroot and drop privileges */ > if (secure) { >@@ -644,13 +646,14 @@ > #endif > } > >-#ifdef HAVE_SETREGID >+ if (! (getgid() && getegid() && getuid() && geteuid()) ) { /* root */ >+#if 0 /* def HAVE_SETREGID does not work */ > setrv = setregid(pw->pw_gid, pw->pw_gid); > #else > setrv = setegid(pw->pw_gid) || setgid(pw->pw_gid); > #endif > >-#ifdef HAVE_SETREUID >+#if 0 /* def HAVE_SETREUID does not work*/ > setrv = setrv || setreuid(pw->pw_uid, pw->pw_uid); > #else > /* Important: setuid() must come first */ >@@ -662,6 +665,7 @@ > syslog(LOG_ERR, "cannot drop privileges: %m"); > exit(EX_OSERR); > } >+ } /* root */ > > /* Other basic setup */ > from.sin_family = AF_INET; >Only in tftp-hpa-0.34/tftpd: tftpd.c~
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 69054
: 42647 |
42648