Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Update Auth Polkit references

Neeraj Gupta897af2a9c102
diff --git a/docs/docs/auth/troubleshooting/linux-system-auth.md b/docs/docs/auth/troubleshooting/linux-system-auth.md
index f399b6d403..8eeabe2b0d 100644
--- a/docs/docs/auth/troubleshooting/linux-system-auth.md
+++ b/docs/docs/auth/troubleshooting/linux-system-auth.md
@@ -24,7 +24,7 @@ shows **Linux setup required**, install the policy manually.
The policy action is:
```text
-io.ente.auth.unlock
+com.ente.auth.unlock
```
### Manual Policy Setup
@@ -34,22 +34,22 @@ manual builds may also need manual setup. Download the policy from GitHub and
verify its SHA-256 checksum before installing it:
```sh
-policy_url="https://raw.githubusercontent.com/ente-io/ente/main/mobile/apps/auth/assets/polkit/io.ente.auth.policy"
-policy_sha256="31e4fb0757c8a55cee49324ddc310ff660a53d7f143049de202510fa58fe1d24"
+policy_url="https://raw.githubusercontent.com/ente-io/ente/main/mobile/apps/auth/assets/polkit/com.ente.auth.policy"
+policy_sha256="efba0409db9a0a53196fa8a7c9f4d4e874234b48287eb5242cf399f466e4c695"
policy="$(mktemp)"
if curl -fsSL "$policy_url" -o "$policy" &&
printf "%s %s\n" "$policy_sha256" "$policy" | sha256sum -c -; then
sudo install -D -o root -g root -m 0644 \
"$policy" \
- /usr/share/polkit-1/actions/io.ente.auth.policy
+ /usr/share/polkit-1/actions/com.ente.auth.policy
if command -v chcon >/dev/null 2>&1; then
sudo chcon system_u:object_r:usr_t:s0 \
- /usr/share/polkit-1/actions/io.ente.auth.policy || true
+ /usr/share/polkit-1/actions/com.ente.auth.policy || true
fi
- pkaction --action-id io.ente.auth.unlock --verbose
+ pkaction --action-id com.ente.auth.unlock --verbose
else
echo "Policy download or checksum verification failed. Not installing."
fi
@@ -63,7 +63,7 @@ If you manually installed the Polkit policy and no longer want Ente Auth to use
Linux system authentication, remove it:
```sh
-sudo rm -f /usr/share/polkit-1/actions/io.ente.auth.policy
+sudo rm -f /usr/share/polkit-1/actions/com.ente.auth.policy
```
## Fingerprint Prompts
diff --git a/mobile/packages/local_auth_linux/lib/local_auth_linux.dart b/mobile/packages/local_auth_linux/lib/local_auth_linux.dart
index c572b568ba..54426ab001 100644
--- a/mobile/packages/local_auth_linux/lib/local_auth_linux.dart
+++ b/mobile/packages/local_auth_linux/lib/local_auth_linux.dart
@@ -5,7 +5,7 @@ import 'package:flutter/services.dart';
import 'package:local_auth_platform_interface/local_auth_platform_interface.dart';
const MethodChannel _defaultChannel = MethodChannel('ente.io/local_auth_linux');
-const String linuxLocalAuthPolkitActionId = 'io.ente.auth.unlock';
+const String linuxLocalAuthPolkitActionId = 'com.ente.auth.unlock';
class LinuxLocalAuthSetupStatus {
const LinuxLocalAuthSetupStatus({
@@ -42,14 +42,14 @@ class LinuxLocalAuthSetupStatus {
return '''
app_id="\${FLATPAK_ID:-io.ente.auth}"
install_dir="\$(flatpak info --show-location "\$app_id")"
-policy="\$install_dir/files/share/enteauth/data/flutter_assets/assets/polkit/io.ente.auth.policy"
-sudo install -D -o root -g root -m 0644 "\$policy" /usr/share/polkit-1/actions/io.ente.auth.policy
-if command -v chcon >/dev/null 2>&1; then sudo chcon system_u:object_r:usr_t:s0 /usr/share/polkit-1/actions/io.ente.auth.policy || true; fi
+policy="\$install_dir/files/share/enteauth/data/flutter_assets/assets/polkit/com.ente.auth.policy"
+sudo install -D -o root -g root -m 0644 "\$policy" /usr/share/polkit-1/actions/com.ente.auth.policy
+if command -v chcon >/dev/null 2>&1; then sudo chcon system_u:object_r:usr_t:s0 /usr/share/polkit-1/actions/com.ente.auth.policy || true; fi
pkaction --action-id $actionId --verbose''';
}
return '''
-sudo install -D -o root -g root -m 0644 "$policyAssetPath" /usr/share/polkit-1/actions/io.ente.auth.policy
-if command -v chcon >/dev/null 2>&1; then sudo chcon system_u:object_r:usr_t:s0 /usr/share/polkit-1/actions/io.ente.auth.policy || true; fi
+sudo install -D -o root -g root -m 0644 "$policyAssetPath" /usr/share/polkit-1/actions/com.ente.auth.policy
+if command -v chcon >/dev/null 2>&1; then sudo chcon system_u:object_r:usr_t:s0 /usr/share/polkit-1/actions/com.ente.auth.policy || true; fi
pkaction --action-id $actionId --verbose''';
}
}
@@ -59,8 +59,8 @@ bool get _isFlatpak =>
File('/.flatpak-info').existsSync();
String get _policyAssetPath => _isFlatpak
- ? '/app/share/enteauth/data/flutter_assets/assets/polkit/io.ente.auth.policy'
- : '/usr/share/enteauth/data/flutter_assets/assets/polkit/io.ente.auth.policy';
+ ? '/app/share/enteauth/data/flutter_assets/assets/polkit/com.ente.auth.policy'
+ : '/usr/share/enteauth/data/flutter_assets/assets/polkit/com.ente.auth.policy';
class LocalAuthLinux extends LocalAuthPlatform {
LocalAuthLinux({@visibleForTesting MethodChannel? channel})
diff --git a/mobile/packages/local_auth_linux/linux/local_auth_linux_plugin.cc b/mobile/packages/local_auth_linux/linux/local_auth_linux_plugin.cc
index 7d1fef4465..f2e797ff56 100644
--- a/mobile/packages/local_auth_linux/linux/local_auth_linux_plugin.cc
+++ b/mobile/packages/local_auth_linux/linux/local_auth_linux_plugin.cc
@@ -14,13 +14,13 @@ static constexpr const char* kPolkitAuthorityPath =
"/org/freedesktop/PolicyKit1/Authority";
static constexpr const char* kPolkitAuthorityInterface =
"org.freedesktop.PolicyKit1.Authority";
-static constexpr const char* kPolkitActionId = "io.ente.auth.unlock";
+static constexpr const char* kPolkitActionId = "com.ente.auth.unlock";
static constexpr const char* kPolicyAssetPath =
- "/usr/share/enteauth/data/flutter_assets/assets/polkit/io.ente.auth.policy";
+ "/usr/share/enteauth/data/flutter_assets/assets/polkit/com.ente.auth.policy";
static constexpr const char* kFlatpakPolicyAssetPath =
- "/app/share/enteauth/data/flutter_assets/assets/polkit/io.ente.auth.policy";
+ "/app/share/enteauth/data/flutter_assets/assets/polkit/com.ente.auth.policy";
static constexpr const char* kBundledPolicyAssetRelativePath =
- "data/flutter_assets/assets/polkit/io.ente.auth.policy";
+ "data/flutter_assets/assets/polkit/com.ente.auth.policy";
struct _LocalAuthLinuxPlugin {
GObject parent_instance;