mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-17 14:07:03 +01:00
g13: Allow the use of a g13tab label for --mount.
* g13/mount.c (g13_mount_container): Do not run the first access check if syshelp is required. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
b781113cf1
commit
f02ceb6c6e
10
g13/mount.c
10
g13/mount.c
@ -60,10 +60,6 @@ g13_mount_container (ctrl_t ctrl, const char *filename, const char *mountpoint)
|
|||||||
char *mountpoint_buffer = NULL;
|
char *mountpoint_buffer = NULL;
|
||||||
char *blockdev_buffer = NULL;
|
char *blockdev_buffer = NULL;
|
||||||
|
|
||||||
/* A quick check to see whether the container exists. */
|
|
||||||
if (access (filename, F_OK))
|
|
||||||
return gpg_error_from_syserror ();
|
|
||||||
|
|
||||||
/* Decide whether we need to use the g13-syshelp. */
|
/* Decide whether we need to use the g13-syshelp. */
|
||||||
err = call_syshelp_find_device (ctrl, filename, &blockdev_buffer);
|
err = call_syshelp_find_device (ctrl, filename, &blockdev_buffer);
|
||||||
if (!err)
|
if (!err)
|
||||||
@ -77,6 +73,12 @@ g13_mount_container (ctrl_t ctrl, const char *filename, const char *mountpoint)
|
|||||||
filename, gpg_strerror (err), gpg_strsource (err));
|
filename, gpg_strerror (err), gpg_strsource (err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* A quick check to see whether we can the container exists. */
|
||||||
|
if (access (filename, R_OK))
|
||||||
|
return gpg_error_from_syserror ();
|
||||||
|
}
|
||||||
|
|
||||||
if (!mountpoint)
|
if (!mountpoint)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user