Ticket #8121: 8121-23521_setuid_win.2.patch
File 8121-23521_setuid_win.2.patch, 906 bytes (added by , 15 years ago) |
---|
-
programs/mythbackend/main.cpp
6 6 #include <fcntl.h> 7 7 #include <libgen.h> 8 8 #include <signal.h> 9 #ifndef _WIN32 9 10 #include <pwd.h> 10 11 #include <grp.h> 12 #endif 11 13 12 14 #include "mythconfig.h" 13 15 #if CONFIG_DARWIN … … 870 872 871 873 if (!username.isEmpty()) 872 874 { 875 #ifdef _WIN32 876 VERBOSE(VB_IMPORTANT, "--user option is not supported on Windows"); 877 return BACKEND_EXIT_INVALID_CMDLINE; 878 #else // ! _WIN32 873 879 struct passwd *user_info = getpwnam(username.toLocal8Bit().constData()); 874 880 const uid_t user_id = geteuid(); 875 881 … … 914 920 .arg(username)); 915 921 return BACKEND_EXIT_PERMISSIONS_ERROR; 916 922 } 923 #endif // ! _WIN32 917 924 } 918 925 919 926 if (pidfs)