Mageia Bugzilla – Attachment 8309 Details for
Bug 18953
cryptmount -a bails out when it finds the first entry in /etc/cryptmount/cmtab is mounted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch received from Penny upstream.
cm-all.patch (text/plain), 1.37 KB, created by
w unruh
on 2016-08-05 18:26:01 CEST
(
hide
)
Description:
Patch received from Penny upstream.
Filename:
MIME Type:
Creator:
w unruh
Created:
2016-08-05 18:26:01 CEST
Size:
1.37 KB
patch
obsolete
>diff --git a/cryptmount.c b/cryptmount.c >index c622943..e775cab 100644 >--- a/cryptmount.c >+++ b/cryptmount.c >@@ -535,7 +535,7 @@ static int do_mount(const km_pw_context_t *pw_ctxt, bound_tgtdefn_t *boundtgt) > if (is_mounted(boundtgt->tgt)) { > fprintf(stderr, _("Target \"%s\" is already mounted\n"), > boundtgt->tgt->ident); >- eflag = ERR_BADMOUNT; >+ eflag = WRN_MOUNTED; > goto bail_out; > } > >@@ -1151,6 +1151,7 @@ static int execute_list(cmmode_t mode, const tgtdefn_t *tgttable, > if ((eflag = check_priv_tgt(boundtgt->tgt)) != ERR_NOERROR) break; > syslogmsg = "mount of \"%s\" by %s %s"; > eflag = do_mount(pw_ctxt, boundtgt); >+ if (eflag == WRN_MOUNTED) syslogmsg = NULL; > break; > case M_UNMOUNT: > if ((eflag = check_priv_tgt(boundtgt->tgt)) != ERR_NOERROR) break; >diff --git a/cryptmount.h b/cryptmount.h >index 01aab83..5a1d121 100644 >--- a/cryptmount.h >+++ b/cryptmount.h >@@ -72,9 +72,10 @@ enum /*! Error flags */ > { > ERR_NOERROR = 0, > >- WRN_UNCONFIG, >+ WRN_UNCONFIG, /*!< Filesystem is already unmounted */ > WRN_NOPASSWD, > WRN_LOWENTROPY, >+ WRN_MOUNTED, /*!< Filesystem is already mounted */ > > ERR_threshold = 0x10, /*!< Dividing-line between warnings & errors */ >
diff --git a/cryptmount.c b/cryptmount.c index c622943..e775cab 100644 --- a/cryptmount.c +++ b/cryptmount.c @@ -535,7 +535,7 @@ static int do_mount(const km_pw_context_t *pw_ctxt, bound_tgtdefn_t *boundtgt) if (is_mounted(boundtgt->tgt)) { fprintf(stderr, _("Target \"%s\" is already mounted\n"), boundtgt->tgt->ident); - eflag = ERR_BADMOUNT; + eflag = WRN_MOUNTED; goto bail_out; } @@ -1151,6 +1151,7 @@ static int execute_list(cmmode_t mode, const tgtdefn_t *tgttable, if ((eflag = check_priv_tgt(boundtgt->tgt)) != ERR_NOERROR) break; syslogmsg = "mount of \"%s\" by %s %s"; eflag = do_mount(pw_ctxt, boundtgt); + if (eflag == WRN_MOUNTED) syslogmsg = NULL; break; case M_UNMOUNT: if ((eflag = check_priv_tgt(boundtgt->tgt)) != ERR_NOERROR) break; diff --git a/cryptmount.h b/cryptmount.h index 01aab83..5a1d121 100644 --- a/cryptmount.h +++ b/cryptmount.h @@ -72,9 +72,10 @@ enum /*! Error flags */ { ERR_NOERROR = 0, - WRN_UNCONFIG, + WRN_UNCONFIG, /*!< Filesystem is already unmounted */ WRN_NOPASSWD, WRN_LOWENTROPY, + WRN_MOUNTED, /*!< Filesystem is already mounted */ ERR_threshold = 0x10, /*!< Dividing-line between warnings & errors */
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18953
: 8309