Restore setusercryptopolicies, lost in a merge.
Looks like when I merged the change that introduced
CryptCommandListener.cpp into my changes, I managed to lose this
function. Without it, non-primary users will stop working after
a reboot.
Change-Id: I9c959b6513698419bc09db69db943d01a296b35e
diff --git a/CryptCommandListener.cpp b/CryptCommandListener.cpp
index 68db073..173be63 100644
--- a/CryptCommandListener.cpp
+++ b/CryptCommandListener.cpp
@@ -289,6 +289,15 @@
dumpArgs(argc, argv, -1);
cryptfs_clear_password();
rc = 0;
+ } else if (!strcmp(argv[1], "setusercryptopolicies")) {
+ if (argc != 3) {
+ cli->sendMsg(ResponseCode::CommandSyntaxError,
+ "Usage: cryptfs setusercryptopolicies <path>", false);
+ return 0;
+ }
+ SLOGD("cryptfs setusercryptopolicies");
+ dumpArgs(argc, argv, -1);
+ rc = e4crypt_set_user_crypto_policies(argv[2]);
} else if (!strcmp(argv[1], "createnewuserdir")) {
if (argc != 4) {
cli->sendMsg(ResponseCode::CommandSyntaxError,