summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/subr.h
Commit message (Collapse)AuthorAgeFilesLines
* Constify argument.pjd2012-01-061-1/+1
| | | | MFC after: 3 days
* Currently we are unable to use capsicum for the primary worker process,pjd2011-05-141-1/+1
| | | | | | | | | | | | | | | | | because we need to do ioctl(2)s, which are not permitted in the capability mode. What we do now is to chroot(2) to /var/empty, which restricts access to file system name space and we drop privileges to hast user and hast group. This still allows to access to other name spaces, like list of processes, network and sysvipc. To address that, use jail(2) instead of chroot(2). Using jail(2) will restrict access to process table, network (we use ip-less jails) and sysvipc (if security.jail.sysvipc_allowed is turned off). This provides much better separation. MFC after: 1 week
* Add my copyright.pjd2011-03-221-0/+1
| | | | MFC after: 1 week
* When dropping privileges prefer capsicum over chroot+setgid+setuid.pjd2011-03-211-1/+1
| | | | | | | | | We can use capsicum for secondary worker processes and hastctl. When working as primary we drop privileges using chroot+setgid+setuid still as we need to send ioctl(2)s to ggate device, for which capsicum doesn't allow (yet). X-MFC after: capsicum is merged to stable/8
* Add snprlcat() and vsnprlcat() - the functions I'm always missing.pjd2011-03-211-0/+3
| | | | | | | They work as a combination of snprintf(3) and strlcat(3) - the caller can append a string build based on the given format. MFC after: 1 week
* Implement function that drops privileges by:pjd2011-01-281-0/+1
| | | | | | | | | | - chrooting to /var/empty (user hast home directory), - setting groups to 'hast' (user hast primary group), - setting real group id, effective group id and saved group id to 'hast', - setting real user id, effective user id and saved user id to 'hast'. At the end verify that those operations where successfull. MFC after: 1 week
* Please welcome HAST - Highly Avalable Storage.pjd2010-02-181-0/+51
HAST allows to transparently store data on two physically separated machines connected over the TCP/IP network. HAST works in Primary-Secondary (Master-Backup, Master-Slave) configuration, which means that only one of the cluster nodes can be active at any given time. Only Primary node is able to handle I/O requests to HAST-managed devices. Currently HAST is limited to two cluster nodes in total. HAST operates on block level - it provides disk-like devices in /dev/hast/ directory for use by file systems and/or applications. Working on block level makes it transparent for file systems and applications. There in no difference between using HAST-provided device and raw disk, partition, etc. All of them are just regular GEOM providers in FreeBSD. For more information please consult hastd(8), hastctl(8) and hast.conf(5) manual pages, as well as http://wiki.FreeBSD.org/HAST. Sponsored by: FreeBSD Foundation Sponsored by: OMCnet Internet Service GmbH Sponsored by: TransIP BV
OpenPOWER on IntegriCloud