mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
21 lines
454 B
C#
21 lines
454 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Remotely.Shared.Services
|
|
{
|
|
public class ElevationDetectorLinux : IElevationDetector
|
|
{
|
|
[DllImport("libc", SetLastError = true)]
|
|
private static extern uint geteuid();
|
|
|
|
public bool IsElevated()
|
|
{
|
|
return geteuid() == 0;
|
|
}
|
|
}
|
|
}
|