Ticket #52257: patch-allow-setuid.diff
File patch-allow-setuid.diff, 1.6 KB (added by RJVB (René Bertin), 8 years ago) |
---|
-
dbus-sysdeps-unix.c
old new 3836 3836 3837 3837 _DBUS_ASSERT_ERROR_IS_CLEAR (error); 3838 3838 3839 if (_dbus_check_setuid ())3840 {3841 dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED,3842 "Unable to find launchd socket when setuid");3843 return FALSE;3844 }3839 // if (_dbus_check_setuid ()) 3840 // { 3841 // dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED, 3842 // "Unable to find launchd socket when setuid"); 3843 // return FALSE; 3844 // } 3845 3845 3846 3846 i = 0; 3847 3847 argv[i] = "launchctl"; … … 3857 3857 3858 3858 if (!_read_subprocess_line_argv(argv[0], TRUE, argv, socket_path, error)) 3859 3859 { 3860 return FALSE; 3860 const char *c = _dbus_getenv (launchd_env_var); 3861 if (*c) 3862 { 3863 _dbus_string_init_const (&socket_path, c); 3864 } 3865 else 3866 { 3867 return FALSE; 3868 } 3861 3869 } 3862 3870 3863 3871 /* no error, but no result either */ … … 3883 3891 dbus_bool_t valid_socket; 3884 3892 DBusString socket_path; 3885 3893 3886 if (_dbus_check_setuid ())3887 {3888 dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED,3889 "Unable to find launchd socket when setuid");3890 return FALSE;3891 }3894 // if (_dbus_check_setuid ()) 3895 // { 3896 // dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED, 3897 // "Unable to find launchd socket when setuid"); 3898 // return FALSE; 3899 // } 3892 3900 3893 3901 if (!_dbus_string_init (&socket_path)) 3894 3902 {