summaryrefslogtreecommitdiff
path: root/sbuild
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2009-11-07 10:25:53 +0000
committerRoger Leigh <rleigh@debian.org>2009-11-07 10:25:53 +0000
commit807a7d07cf7e38ae2dab7400a8be3ba268cd9377 (patch)
tree2c2df58ea50d314a336212f85d2cccf3fd667c2b /sbuild
parentc840bc363d63f714778cff774980c158a200a00c (diff)
downloadschroot-807a7d07cf7e38ae2dab7400a8be3ba268cd9377.tar.gz
sbuild::session: Set child_status to EXIT_SUCCESS following authentication
If not done at this point, ending sessions etc. can return failure even though they completed.
Diffstat (limited to 'sbuild')
-rw-r--r--sbuild/sbuild-session.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sbuild/sbuild-session.cc b/sbuild/sbuild-session.cc
index cafca002..4fcef897 100644
--- a/sbuild/sbuild-session.cc
+++ b/sbuild/sbuild-session.cc
@@ -619,6 +619,12 @@ session::run_impl ()
}
assert(chroot);
+ // Following authentication success, default child status to
+ // success so that operations such as beginning, ending and
+ // recovering sessions will return success unless an
+ // exception is thrown.
+ this->child_status = EXIT_SUCCESS;
+
try
{
/* Run setup-start chroot setup scripts. */
@@ -626,7 +632,6 @@ session::run_impl ()
if (this->session_operation == OPERATION_BEGIN)
{
cout << chroot->get_session_id() << endl;
- this->child_status = EXIT_SUCCESS;
}
/* Run recover scripts. */