mirror of
https://gitee.com/openharmony/developtools_hdc
synced 2024-11-23 23:20:43 +00:00
commit
d1d46e1a99
@ -330,7 +330,7 @@ pub const ENV_FILE_CONTROL: &str = "persist.hdc.control.file";
|
||||
pub const ENV_FPORT_CONTROL: &str = "persist.hdc.control.fport";
|
||||
|
||||
pub const RSA_BIT_NUM: usize = 3072;
|
||||
pub const RSA_PUBKEY_PATH: &str = "/data/service/el0/hdc";
|
||||
pub const RSA_PUBKEY_PATH: &str = "/data/service/el1/public/hdc";
|
||||
pub const RSA_PUBKEY_NAME: &str = "hdc_keys";
|
||||
pub const RSA_PRIKEY_PATH: &str = ".harmony";
|
||||
pub const RSA_PRIKEY_NAME: &str = "hdckey";
|
||||
|
@ -441,7 +441,7 @@ void LoadDaemonKey(list<void *> *listPublicKey)
|
||||
#ifdef HDC_PCDEBUG
|
||||
char keyPaths[][BUF_SIZE_SMALL] = { "/root/.harmony/hdckey.pub" };
|
||||
#else
|
||||
char keyPaths[][BUF_SIZE_SMALL] = { "/data/service/el0/hdc/hdc_keys" };
|
||||
char keyPaths[][BUF_SIZE_SMALL] = { "/data/service/el1/public/hdc/hdc_keys" };
|
||||
#endif
|
||||
int num = sizeof(keyPaths) / sizeof(keyPaths[0]);
|
||||
struct stat buf;
|
||||
|
@ -344,7 +344,7 @@ bool HdcDaemon::GetHostPubkeyInfo(const string& buf, string& hostname, string& p
|
||||
|
||||
void HdcDaemon::ClearKnownHosts()
|
||||
{
|
||||
char const *keyfile = "/data/service/el0/hdc/hdc_keys";
|
||||
char const *keyfile = "/data/service/el1/public/hdc/hdc_keys";
|
||||
|
||||
if (!enableSecure || HandDaemonAuthBypass()) {
|
||||
WRITE_LOG(LOG_INFO, "not enable secure, noneed clear keyfile");
|
||||
@ -380,7 +380,7 @@ void HdcDaemon::ClearKnownHosts()
|
||||
|
||||
void HdcDaemon::UpdateKnownHosts(const string& key)
|
||||
{
|
||||
char const *keyfile = "/data/service/el0/hdc/hdc_keys";
|
||||
char const *keyfile = "/data/service/el1/public/hdc/hdc_keys";
|
||||
|
||||
std::ofstream keyofs(keyfile, std::ios::app);
|
||||
if (!keyofs.is_open()) {
|
||||
@ -400,7 +400,7 @@ void HdcDaemon::UpdateKnownHosts(const string& key)
|
||||
|
||||
bool HdcDaemon::AlreadyInKnownHosts(const string& key)
|
||||
{
|
||||
char const *keyfile = "/data/service/el0/hdc/hdc_keys";
|
||||
char const *keyfile = "/data/service/el1/public/hdc/hdc_keys";
|
||||
|
||||
std::ifstream keyifs(keyfile);
|
||||
if (!keyifs.is_open()) {
|
||||
|
@ -2,8 +2,8 @@
|
||||
"jobs" : [{
|
||||
"name" : "post-fs-data",
|
||||
"cmds" : [
|
||||
"mkdir /data/service/el0/hdc 0775 root shell",
|
||||
"restorecon /data/service/el0/hdc"
|
||||
"mkdir /data/service/el1/public/hdc 0775 root shell",
|
||||
"restorecon /data/service/el1/public/hdc"
|
||||
]
|
||||
},{
|
||||
"name" : "param:persist.hdc.control=false",
|
||||
|
@ -2,8 +2,8 @@
|
||||
"jobs" : [{
|
||||
"name" : "post-fs-data",
|
||||
"cmds" : [
|
||||
"mkdir /data/service/el0/hdc 0775 root shell",
|
||||
"restorecon /data/service/el0/hdc"
|
||||
"mkdir /data/service/el1/public/hdc 0775 root shell",
|
||||
"restorecon /data/service/el1/public/hdc"
|
||||
]
|
||||
},{
|
||||
"name" : "param:persist.hdc.control=false",
|
||||
|
Loading…
Reference in New Issue
Block a user