first commit
This commit is contained in:
14
Services/Interfaces/IUserSwitcher.cs
Normal file
14
Services/Interfaces/IUserSwitcher.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using HanaToolbox.Services.Interfaces;
|
||||
|
||||
namespace HanaToolbox.Services.Interfaces;
|
||||
|
||||
public interface IUserSwitcher
|
||||
{
|
||||
/// <summary>
|
||||
/// Executes a shell command string as <sid>adm using `su - <sid>adm -c`.
|
||||
/// If already running as <sid>adm, runs the command directly.
|
||||
/// </summary>
|
||||
Task<ProcessResult> RunAsAsync(
|
||||
string sid, string shellCommand,
|
||||
CancellationToken ct = default);
|
||||
}
|
||||
Reference in New Issue
Block a user