Send the 802.1X password over stdin instead of argv
argv is world-readable in /proc for every local process while the connection attempt runs. Create the profile without the secret, then set it through nmcli's scriptable connection editor, which reads from stdin. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
840832cfde
commit
6963432600
@@ -579,10 +579,24 @@ Panel {
|
||||
|
||||
function connectEnterprise(ssid, identity, passphrase) {
|
||||
runNetworkAction("connect", networkForSsid(ssid), function(network) {
|
||||
Quickshell.execDetached(["bash", "-c", Model.enterpriseConnectScript, "nmcli-eap", ssid, identity, passphrase])
|
||||
enterpriseConnect.secret = passphrase
|
||||
enterpriseConnect.command = ["bash", "-c", Model.enterpriseConnectScript, "nmcli-eap", ssid, identity]
|
||||
enterpriseConnect.running = true
|
||||
})
|
||||
}
|
||||
|
||||
// Creates and activates the 802.1X profile (see Model.enterpriseConnectScript).
|
||||
// The password goes over stdin, never argv.
|
||||
Process {
|
||||
id: enterpriseConnect
|
||||
property string secret: ""
|
||||
stdinEnabled: true
|
||||
onStarted: {
|
||||
write(secret + "\n")
|
||||
secret = ""
|
||||
}
|
||||
}
|
||||
|
||||
function disconnect(network) {
|
||||
runNetworkAction("disconnect", network || connectedWifiNetwork, function(net) { net.disconnect() })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user