1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-10 13:23:41 +00:00

Updated user-consent on linux to auto-fail when current uid is the gdm

This commit is contained in:
Bryan Roe
2020-05-12 16:09:00 -07:00
parent a2cba4b6ac
commit 382105e135
2 changed files with 8 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@@ -283,6 +283,7 @@ function linux_messageBox()
var ret = new promise(function (res, rej) { this._res = res; this._rej = rej; });
var uid;
var xinfo;
var min = require('user-sessions').minUid();
try
{
@@ -295,7 +296,7 @@ function linux_messageBox()
xinfo = require('monitor-info').getXInfo(0);
}
if (xinfo == null)
if (xinfo == null || (uid != 0 && uid < min))
{
ret._rej('This system cannot display a user dialog box when a user is not logged in');
return (ret);