1
/* Copyright © 2005-2006 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 2 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, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18
*********************************************************************/
20
#ifndef DCHROOT_SESSION_H
21
#define DCHROOT_SESSION_H
23
#include <dchroot/dchroot-session-base.h>
29
* Session handler for dchroot sessions.
31
* This class provides the session handling for dchroot
32
* compatibility. It overrides the normal authentication checks to
33
* allow all users to access the service, and it specialises the
34
* session behaviour to be compatible with the chdir and command
35
* execution behaviour of dchroot.
37
class session : public session_base
43
* @param service the PAM service name.
44
* @param config a shared_ptr to the chroot configuration.
45
* @param operation the session operation to perform.
46
* @param chroots the chroots to act upon.
47
* @param compat true to enable full dchroot compatibility, or
48
* false to enable schroot compatiblity (permissions checks).
50
session (std::string const& service,
53
sbuild::string_list const& chroots,
59
virtual sbuild::auth::status
60
get_chroot_auth_status (sbuild::auth::status status,
61
sbuild::chroot::ptr const& chroot) const;
63
virtual sbuild::string_list
64
get_login_directories () const;
67
get_user_command (sbuild::chroot::ptr& session_chroot,
69
sbuild::string_list& command) const;
74
#endif /* DCHROOT_SESSION_H */