From 84ebbd625955a48ed21ed436d67d3cf45d348576 Mon Sep 17 00:00:00 2001 From: Andras Gemes Date: Sat, 26 Oct 2024 11:20:27 +0200 Subject: [PATCH 1/2] BSim: Add DN_OPTION to fix bsim_ctl changeauth for PKI authentication --- .../java/ghidra/features/bsim/query/BSimControlLaunchable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java index 9b8e7137aa..73178563c4 100644 --- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java +++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java @@ -97,7 +97,7 @@ public class BSimControlLaunchable implements GhidraLaunchable { Set.of(DN_OPTION); private static final Set DROPUSER_OPTIONS = Set.of(); private static final Set CHANGEAUTH_OPTIONS = Set.of( - AUTH_OPTION, NO_LOCAL_AUTH_OPTION, CAFILE_OPTION); + AUTH_OPTION, DN_OPTION, NO_LOCAL_AUTH_OPTION, CAFILE_OPTION); //@formatter:on private static final Map> ALLOWED_OPTION_MAP = new HashMap<>(); From afed1f9aa93de50785d05a899cd64fea8c112371 Mon Sep 17 00:00:00 2001 From: James <49045138+ghidracadabra@users.noreply.github.com> Date: Thu, 7 Nov 2024 20:27:19 +0000 Subject: [PATCH 2/2] GP-5106 clarify bsim help --- .../main/help/help/topics/BSim/CommandLineReference.html | 7 +++++++ .../ghidra/features/bsim/query/BSimControlLaunchable.java | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Ghidra/Features/BSim/src/main/help/help/topics/BSim/CommandLineReference.html b/Ghidra/Features/BSim/src/main/help/help/topics/BSim/CommandLineReference.html index cf4d16f9bf..8bc1ec1f12 100644 --- a/Ghidra/Features/BSim/src/main/help/help/topics/BSim/CommandLineReference.html +++ b/Ghidra/Features/BSim/src/main/help/help/topics/BSim/CommandLineReference.html @@ -184,6 +184,13 @@ "command">--noLocalAuth causes local connections to require authentication. This command does not affect the presence or absence of passwords or Distinguished Names for existing users.

+ +

--cafile </cafile-path> - specifies an absolute path to a + certificate authority file and is required for --auth pki. This file should contain the + certificates the PostgreSQL server will use to authenticate in PEM format + concatenated together.

--dn <distinguished-name> - specifies the Distinguished Name for the admin diff --git a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java index 73178563c4..9b665073be 100644 --- a/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java +++ b/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/BSimControlLaunchable.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -1434,7 +1434,7 @@ public class BSimControlLaunchable implements GhidraLaunchable { " stop [--force]\n" + " adduser [--dn \"\"]\n" + " dropuser \n" + - " changeauth [--auth|-a pki|password|trust] [--noLocalAuth] [--cafile \"\"]\n" + + " changeauth [--auth|-a pki|password|trust] [--noLocalAuth] [--cafile \"\"] [--dn \"\"]\n" + " resetpassword \n" + " changeprivilege admin|user\n" + "\n" +