New option -acl enables ACL loading
This commit is contained in:
@ -525,7 +525,7 @@ int Xorriso_assert_volid(struct XorrisO *xorriso, int msc1, int flag)
|
||||
*/
|
||||
int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
||||
{
|
||||
int ret, hret, not_writeable= 0, has_what, aquire_flag, load_lba;
|
||||
int ret, hret, not_writeable= 0, has_what, aquire_flag, load_lba, ext;
|
||||
uint32_t size;
|
||||
struct burn_drive_info *dinfo= NULL, *out_dinfo, *in_dinfo;
|
||||
struct burn_drive *drive, *out_drive, *in_drive;
|
||||
@ -582,6 +582,10 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
||||
isoburn_set_msgs_submit(Xorriso_msgs_submit_void, (void *) xorriso,
|
||||
(3<<2) | 128 , 0);
|
||||
aquire_flag= 1 | ((flag&(8|4))>>1) | ((xorriso->toc_emulation_flag & 3)<<3);
|
||||
if(!(xorriso->do_aaip & 1))
|
||||
aquire_flag|= 32;
|
||||
if(!(xorriso->do_aaip & 4))
|
||||
aquire_flag|= 64;
|
||||
ret= isoburn_drive_aquire(&dinfo, libburn_adr, aquire_flag);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
if(ret<=0) {
|
||||
@ -670,7 +674,18 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
||||
ret= isoburn_ropt_new(&ropts, 0);
|
||||
if(ret<=0)
|
||||
goto ex;
|
||||
isoburn_ropt_set_extensions(ropts, isoburn_ropt_noiso1999);
|
||||
|
||||
ext= isoburn_ropt_noiso1999;
|
||||
#ifdef isoburn_ropt_noacl
|
||||
if(!(xorriso->do_aaip & 1))
|
||||
ext|= isoburn_ropt_noacl;
|
||||
#endif
|
||||
#ifdef isoburn_ropt_noea
|
||||
if(!(xorriso->do_aaip & 4))
|
||||
ext|= isoburn_ropt_noea;
|
||||
#endif
|
||||
isoburn_ropt_set_extensions(ropts, ext);
|
||||
|
||||
isoburn_ropt_set_default_perms(ropts, (uid_t) 0, (gid_t) 0, (mode_t) 0555);
|
||||
isoburn_ropt_set_input_charset(ropts, xorriso->in_charset);
|
||||
|
||||
@ -703,6 +718,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
||||
isoburn_ropt_noiso1999 | isoburn_ropt_norock | isoburn_ropt_nojoliet);
|
||||
}
|
||||
|
||||
|
||||
ret= isoburn_read_image(drive, ropts, &volset);
|
||||
|
||||
/* <<< Resetting to normal thresholds */
|
||||
@ -8603,28 +8619,6 @@ int Xorriso_mount(struct XorrisO *xorriso, char *dev, int adr_mode,
|
||||
0, "SORRY", 0);
|
||||
sprintf(xorriso->result_line, "%s\n", mount_command);
|
||||
Xorriso_result(xorriso,0);
|
||||
|
||||
#ifdef NIX
|
||||
|
||||
} else if(geteuid() != getuid() || getgid() != getegid()) {
|
||||
Xorriso_msgs_submit(xorriso, 0,
|
||||
"-mount : Detected own setuid/gid identity. Will not perform mount command.",
|
||||
0, "SORRY", 0);
|
||||
sprintf(xorriso->result_line, "%s\n", mount_command);
|
||||
Xorriso_result(xorriso,0);
|
||||
} else {
|
||||
/* >>> find safer way to perform command */;
|
||||
ret= system(mount_command);
|
||||
if(WIFEXITED(ret) && WEXITSTATUS(ret) != 0) {
|
||||
sprintf(xorriso->info_text,
|
||||
"-mount : mount command failed with exit value %d",
|
||||
(int) WEXITSTATUS(ret));
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
ret= 0; goto ex;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
} else {
|
||||
ret= Xorriso_execv(xorriso, mount_command, "/bin:/sbin", &status, 1);
|
||||
if(WIFEXITED(status) && WEXITSTATUS(status) != 0) {
|
||||
@ -8634,9 +8628,6 @@ int Xorriso_mount(struct XorrisO *xorriso, char *dev, int adr_mode,
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
ret= 0; goto ex;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
sprintf(xorriso->info_text, "\nMounted session %d of device %s",
|
||||
session, Text_shellsafe(dev_path, sfe, 0));
|
||||
dpt= strchr(cmd, ':');
|
||||
@ -8795,8 +8786,13 @@ int Xorriso_getfacl(struct XorrisO *xorriso, char *path, char **acl_text,
|
||||
goto ex;
|
||||
}
|
||||
if(ret == 0 || ret == 2) {
|
||||
#ifdef Xorriso_with_aaiP
|
||||
strcpy(xorriso->info_text, "No ACL associated with ");
|
||||
Text_shellsafe(path, xorriso->info_text, 1);
|
||||
#else
|
||||
strcpy(xorriso->info_text,
|
||||
"ACL not enabled by Libisofs_with_aaiP/Xorriso_with_aaiP");
|
||||
#endif
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0);
|
||||
if(ret == 0)
|
||||
{ret= 2; goto ex;}
|
||||
@ -8841,3 +8837,17 @@ ex:;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
int Xorriso_set_ignore_aclea(struct XorrisO *xorriso, int flag)
|
||||
{
|
||||
int ret;
|
||||
IsoImage *volume;
|
||||
|
||||
ret= Xorriso_get_volume(xorriso, &volume, 0);
|
||||
if(ret<=0)
|
||||
return(ret);
|
||||
iso_image_set_ignore_aclea(volume,
|
||||
((~xorriso->do_aaip) & 1) | (((~xorriso->do_aaip) & 4) >> 1));
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user