`
huangqinqin
  • 浏览: 360293 次
  • 性别: Icon_minigender_2
  • 来自: 福州
社区版块
存档分类
最新评论

access wpa_supplicant.conf

 
阅读更多
if (access(SUPP_CONFIG_TEMPLATE, R_OK|W_OK) == 0){
LOGE("access %s successfull!", SUPP_CONFIG_TEMPLATE);
} else if(errno != ENOENT) {
LOGE("access %s failed! Now try to open it in O_WRONLY mode", SUPP_CONFIG_TEMPLATE);

if (chown(SUPP_CONFIG_TEMPLATE, AID_SYSTEM, AID_WIFI) < 0) {
LOGE("Error changing group ownership of %s to %d: %s",
SUPP_CONFIG_TEMPLATE, AID_WIFI, strerror(errno));
} else {

ret = chmod(SUPP_CONFIG_TEMPLATE, S_IRUSR | S_IWUSR);
if (ret < 0) {
LOGE("chmod %s with write and read right failed!", SUPP_CONFIG_TEMPLATE);
} else {
LOGE("chmod %s with write and read right Successfully!", SUPP_CONFIG_TEMPLATE);
}
}

}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics