atftp/atftp-drop_privileges_non-daemon.patch
Dirk Mueller 2d593c9f75 - Delete /usr/sbin/rc* symlink & specfile housekeeping
- Make atftpd.socket listen on AF_INET6 as well
- Deactivate FORTIFY_SOURCE for the time being due to a glibc bug

OBS-URL: https://build.opensuse.org/package/show/network/atftp?expand=0&rev=58
2024-09-27 07:51:17 +00:00

25 lines
814 B
Diff

Index: atftp-0.7.5/tftpd.c
===================================================================
--- atftp-0.7.5.orig/tftpd.c
+++ atftp-0.7.5/tftpd.c
@@ -99,8 +99,8 @@ int deny_severity = LOG_NOTICE;
#endif
/* user ID and group ID when running as a daemon */
-char user_name[MAXLEN] = "nobody";
-char group_name[MAXLEN] = "nogroup";
+char user_name[MAXLEN] = "tftp";
+char group_name[MAXLEN] = "tftp";
/* For special uses, disable source port checking */
int source_port_checking = 1;
@@ -298,7 +298,7 @@ int main(int argc, char **argv)
dup2(sockfd, 0);
close(sockfd);
- /* release priviliedge */
+ /* release priviledge */
/* first see if we are or can somehow become root, if so prepare
* for drop even if not requested on command line */