1
/* Copyright © 2005-2009 Roger Leigh <rleigh@debian.org>
3
* schroot is free software: you can redistribute it and/or modify it
4
* under the terms of the GNU General Public License as published by
5
* the Free Software Foundation, either version 3 of the License, or
6
* (at your option) any later version.
8
* schroot is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see
15
* <http://www.gnu.org/licenses/>.
17
*********************************************************************/
19
#ifndef SBUILD_CHROOT_FACET_PERSONALITY_H
20
#define SBUILD_CHROOT_FACET_PERSONALITY_H
22
#include <sbuild/sbuild-chroot-facet.h>
23
#include <sbuild/sbuild-personality.h>
29
* Chroot support for kernel personalities (execution domains).
31
class chroot_facet_personality : public chroot_facet
34
/// A shared_ptr to a chroot facet object.
35
typedef std::tr1::shared_ptr<chroot_facet_personality> ptr;
37
/// A shared_ptr to a const chroot facet object.
38
typedef std::tr1::shared_ptr<const chroot_facet_personality> const_ptr;
42
chroot_facet_personality ();
46
virtual ~chroot_facet_personality ();
49
* Create a chroot facet.
51
* @returns a shared_ptr to the new chroot facet.
56
virtual chroot_facet::ptr
59
virtual std::string const&
63
* Get the process execution domain for the chroot.
65
* @returns the personality.
71
* Set the process execution domain for the chroot.
73
* @param persona the personality.
76
set_persona (personality const& persona);
79
setup_env (chroot const& chroot,
80
environment& env) const;
82
virtual chroot::session_flags
83
get_session_flags (chroot const& chroot) const;
86
get_details (chroot const& chroot,
87
format_detail& detail) const;
90
get_keyfile (chroot const& chroot,
91
keyfile& keyfile) const;
94
set_keyfile (chroot& chroot,
95
keyfile const& keyfile,
96
string_list& used_keys);
99
/// Process execution domain (Linux only).
105
#endif /* SBUILD_CHROOT_FACET_PERSONALITY_H */