A utility for emulating root privileges
C Python Shell
Permalink
Failed to load latest commit information.
doc Implement PSEUDO_UNLOAD, replacing existing PSEUDO_RELOADED semantics. Nov 2, 2011
enums Major shift: All the id_t types have been reworked so that they Nov 30, 2010
guts Merge in ports work Mar 25, 2011
ports bitrot and linkat() fixes for Darwin. Dec 12, 2012
table_templates Major shift: All the id_t types have been reworked so that they Nov 30, 2010
templates Fix realpath(name, NULL) when PSEUDO_DISABLED=1 Jun 9, 2011
test Implement PSEUDO_UNLOAD, replacing existing PSEUDO_RELOADED semantics. Nov 2, 2011
.gitignore Merge in ports work Mar 25, 2011
COPYING initial public release Mar 17, 2010
ChangeLog.txt tag (and makefile.in) 1.4.2 Dec 14, 2012
Futures.txt Add "Futures.txt" for notes about planned work. Nov 17, 2010
Makefile.in tag (and makefile.in) 1.4.2 Dec 14, 2012
README change official upstream Apr 30, 2012
configure Makefile.in/configure: Use $(LIB), not hardcoded lib, for sqlite Nov 3, 2012
makedata.c Add performance test (rough draft). Feb 1, 2011
maketables Merge in ports work Mar 25, 2011
makewrappers add linkat() implementation Dec 12, 2012
offsets.c While looking at a possible 64/32-bit clash (there wasn't one after Aug 26, 2010
perftest Add performance test (rough draft). Feb 1, 2011
pseudo.1 Rework the clone wrapper to add an intermediate function to resolve a… Nov 2, 2011
pseudo.c Implement PSEUDO_UNLOAD, replacing existing PSEUDO_RELOADED semantics. Nov 2, 2011
pseudo.h bitrot and linkat() fixes for Darwin. Dec 12, 2012
pseudo_client.c Remove the _plain thing, use PSEUDO_STATBUF everywhere. Aug 2, 2012
pseudo_client.h Fix up chroot damage caused by PSEUDO_STATBUF fix Aug 9, 2012
pseudo_db.c Merge in ports work Mar 25, 2011
pseudo_db.h Major shift: All the id_t types have been reworked so that they Nov 30, 2010
pseudo_ipc.c Remove the _plain thing, use PSEUDO_STATBUF everywhere. Aug 2, 2012
pseudo_ipc.h Remove the _plain thing, use PSEUDO_STATBUF everywhere. Aug 2, 2012
pseudo_server.c Try to force debug fd to 2. The intent is that this will keep malloc Mar 25, 2011
pseudo_server.h Updates/improvements for logging Apr 27, 2010
pseudo_util.c [Yocto #2639] Don't crash with really long chroot directories Jun 28, 2012
pseudo_wrappers.c Remove the _plain thing, use PSEUDO_STATBUF everywhere. Aug 2, 2012
pseudodb.c Updates: Enable additional warnings, fix a number of things. Mar 26, 2010
pseudolog.1 Updates/improvements for logging Apr 27, 2010
pseudolog.c A couple more int/size_t mismatch fixes. Sep 1, 2010
run_tests.sh Enable execl, execle, execlp, execv, and execvp wrappers Aug 11, 2010
templatefile.py Whitespace changes. Apr 5, 2011

README

pseudo -- an analogue to sudo

IMPORTANT NOTE:

As of this writing, the official home for pseudo's git repository has
changed to:
	git://git.yoctoproject.org/pseudo

The old site at:
	https://github.com/wrpseudo/pseudo

is no longer the "real" master, although I'll probably try to keep it in
sync.

OVERVIEW:

The pseudo utility offers a way to run commands in a virtualized "root"
environment, allowing ordinary users to run commands which give the illusion
of creating device nodes, changing file ownership, and otherwise doing
things necessary for creating distribution packages or filesystems.

To configure, run the provided configure script.  Note that this is
NOT an autoconf script.

Configure options:
	    --prefix=/path/to/install/dir
	    --with-sqlite=/path/to/sqlite/dir
	    --bits={32,64}
	    --suffix=<text>

There is no default prefix.  The default for sqlite is /usr, and for
bits is 32.  You need a reasonably modern sqlite3 -- it has to have
sqlite3_clear_bindings(), which at least one default sqlite3 install
did not.  (But that was dated 2006, so I'm not sure this will affect
most readers.)

The suffix value can be used to append a particular text string to file
names (such as libpseudo<suffix>.so).  This was used in the WR environment
to create libpseudo-<host_libc_md5sum>.so, to ensure that libpseudo was
rebuilt if the host libc changed.

This code is not particularly portable, but works on Linux and also
on 64-bit Intel Darwin systems.

Limited user documentation is provided in the given man page files (these
are not currently installed, merely provided in the source directory), and
some documentation on internals is provided in the doc/ directory.


FUTURE DIRECTIONS:

* The chroot() functionality is incomplete, though now sufficient for
  the real-world use cases we've tried.
* I have no intention of converting to autoconf.  It is the wrong tool
  for the job.

Please feel free to send bug feedback, change requests, or general
commentary.


ACKNOWLEDGEMENTS:

My various coworkers, both engineering and management, made this possible.
While I did most of the actual typing, this code has benefitted greatly
from detailed code reviews, excellent reproducers for bugs, and the
consistent support of the whole group for the project.  It's been a great
deal of fun, and I'm pretty happy that we're finally ready to make it
available for other people to look at.