Multi user fixes

This commit is contained in:
crschnick 2024-07-10 01:00:56 +00:00
parent 26c911c057
commit 1893464432
3 changed files with 10 additions and 1 deletions

View file

@ -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 -> {

View file

@ -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) {

View file

@ -1 +1 @@
10.1-6
10.1-7