|
|
|
@ -41,7 +41,6 @@ int yon_file_save(char *file_path, char *text){
|
|
|
|
FILE *file = fopen(file_path,"w");
|
|
|
|
FILE *file = fopen(file_path,"w");
|
|
|
|
struct passwd *user = getpwnam(yon_ubl_root_user_get());
|
|
|
|
struct passwd *user = getpwnam(yon_ubl_root_user_get());
|
|
|
|
if (chown(file_path,user->pw_uid,user->pw_gid)){};
|
|
|
|
if (chown(file_path,user->pw_uid,user->pw_gid)){};
|
|
|
|
if (chmod(file_path,0644)){};
|
|
|
|
|
|
|
|
if (file){
|
|
|
|
if (file){
|
|
|
|
fputs(text,file);
|
|
|
|
fputs(text,file);
|
|
|
|
fclose(file);
|
|
|
|
fclose(file);
|
|
|
|
@ -58,7 +57,6 @@ int yon_file_create(char *path, char *name, int rules){
|
|
|
|
if (fl){
|
|
|
|
if (fl){
|
|
|
|
struct passwd *user = getpwnam(yon_ubl_root_user_get());
|
|
|
|
struct passwd *user = getpwnam(yon_ubl_root_user_get());
|
|
|
|
if (chown(path,user->pw_uid,user->pw_gid)){};
|
|
|
|
if (chown(path,user->pw_uid,user->pw_gid)){};
|
|
|
|
if (chmod(path,0644)){};
|
|
|
|
|
|
|
|
fclose(fl);
|
|
|
|
fclose(fl);
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|