sendfile.patch 796 B

12345678910111213141516171819202122232425262728
  1. --- src/io.h.orig Mon Mar 5 23:38:04 2001
  2. +++ src/io.h Mon Mar 5 23:38:04 2001
  3. @@ -15,6 +15,8 @@
  4. * This file is covered by the GNU General Public License
  5. */
  6. +#include <sys/types.h>
  7. +
  8. /* read n bytes from network socket */
  9. int readn(int, char *, int);
  10. --- src/sendfiled.c.org Tue Feb 6 00:42:53 2001
  11. +++ src/sendfiled.c Sun Aug 26 21:21:18 2001
  12. @@ -4000,11 +4002,13 @@
  13. * RETURN: nothing, but terminates program on error
  14. */
  15. void setreugid() {
  16. + if (rgid != getegid())
  17. if (rgid && setegid(rgid)<0) {
  18. printf("490 Internal error on setegid(%u): %s\r\n",
  19. (unsigned int)rgid,strerror(errno));
  20. exit(1);
  21. }
  22. + if (ruid != geteuid())
  23. if (ruid && seteuid(ruid)<0) {
  24. printf("490 Internal error on seteuid(%u): %s\r\n",
  25. (unsigned int)ruid,strerror(errno));