Changeset 84584 in vbox for trunk/src/VBox/Additions
- Timestamp:
- May 28, 2020 12:09:35 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138314
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/display-drm.cpp
r84579 r84584 46 46 #include <iprt/err.h> 47 47 #include <iprt/string.h> 48 48 #include <iprt/initterm.h> 49 #include <iprt/message.h> 50 #include <unistd.h> 49 51 #include <stdio.h> 50 52 … … 160 162 unsigned cHeads) 161 163 { 164 uid_t guid = getuid(); 165 if (setuid(0) == -1) 166 { 167 perror("setuid failed during drm ioctl."); 168 } 169 162 170 int rc; 163 171 struct DRMVMWUPDATELAYOUT ioctlLayout; … … 171 179 if (RT_FAILURE(rc) && rc != VERR_INVALID_PARAMETER) 172 180 VBClLogFatalError("Failure updating layout, rc=%Rrc\n", rc); 181 setuid(guid); 173 182 } 174 183 175 int main() 176 { 184 int main(int argc, char *argv[]) 185 { 186 uid_t guid = getuid(); 187 if (setuid(0) == -1) 188 { 189 perror("setuid failed during init."); 190 } 191 192 int rc = RTR3InitExe(argc, &argv, 0); 193 if (RT_FAILURE(rc)) 194 return RTMsgInitFailure(rc); 195 rc = VbglR3InitUser(); 196 if (RT_FAILURE(rc)) 197 VBClLogFatalError("VbglR3InitUser failed: %Rrc", rc); 198 177 199 struct DRMCONTEXT drmContext = { NIL_RTFILE }; 178 200 static struct VMMDevDisplayDef aMonitors[VMW_MAX_HEADS]; 179 int rc; 201 180 202 unsigned cEnabledMonitors; 181 203 /* Do not acknowledge the first event we query for to pick up old events, … … 201 223 return VERR_INVALID_HANDLE; 202 224 } 225 setuid(guid); 203 226 for (;;) 204 227 { -
trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
r84561 r84584 685 685 static bool init() 686 686 { 687 if ( isXwayland())687 if (1 || isXwayland()) 688 688 { 689 689 VBClLogInfo("The parent session seems to be running on Wayland. Starting DRM client\n");
Note:
See TracChangeset
for help on using the changeset viewer.