mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 09:00:26 +00:00
Multi user fixes
This commit is contained in:
parent
26c911c057
commit
1893464432
3 changed files with 10 additions and 1 deletions
|
@ -84,6 +84,7 @@ public class AppBeaconServer {
|
|||
public static void reset() {
|
||||
if (INSTANCE != null) {
|
||||
INSTANCE.stop();
|
||||
INSTANCE.deleteAuthSecret();
|
||||
INSTANCE = null;
|
||||
}
|
||||
}
|
||||
|
@ -112,6 +113,13 @@ public class AppBeaconServer {
|
|||
localAuthSecret = id;
|
||||
}
|
||||
|
||||
private void deleteAuthSecret() {
|
||||
var file = XPipeInstallation.getLocalBeaconAuthFile();
|
||||
try {
|
||||
Files.delete(file);
|
||||
} catch (IOException ignored) {}
|
||||
}
|
||||
|
||||
private void start() throws IOException {
|
||||
server = HttpServer.create(new InetSocketAddress(InetAddress.getLoopbackAddress(), port), 10);
|
||||
BeaconInterface.getAll().forEach(beaconInterface -> {
|
||||
|
|
|
@ -26,6 +26,7 @@ public class ShellTemp {
|
|||
temp = temp.resolve(user != null ? user : "user");
|
||||
|
||||
try {
|
||||
Files.createDirectories(temp);
|
||||
// We did not set this in earlier versions. If we are running as a different user, it might fail
|
||||
Files.setPosixFilePermissions(temp, PosixFilePermissions.fromString("rwxrwxrwx"));
|
||||
} catch (Exception e) {
|
||||
|
|
2
version
2
version
|
@ -1 +1 @@
|
|||
10.1-6
|
||||
10.1-7
|
||||
|
|
Loading…
Reference in a new issue