Commit Graph

11 Commits

Author SHA1 Message Date
Jaakko Heinonen
7f79e870d2 - Print the nmount(2) provided error message only when it is set.
- Ensure that the error message is NUL-terminated before printing it.

PR:		bin/147482
MFC after:	2 weeks
2010-10-10 09:24:19 +00:00
Pawel Jakub Dawidek
923f9901b4 Initialize iov and iovlen before use.
Reported by:	Lucius Windschuh <lwindschuh@googlemail.com>
2009-06-02 18:30:09 +00:00
Pawel Jakub Dawidek
c8cf3f3d0e - Move from mount(2) to nmount(2). This should allow to convert MNT_SNAPSHOT
flag from a mount flag to FS-specific flag.
- Simplify usage. Instead of 'mksnap_ffs /mnt/foo /mnt/foo/snap' allow to
  give only one argument: 'mksnap_ffs /mnt/foo/snap'. Old usage is also
  accepted for now.
- Add an example of how to mount a snapshot.
2009-05-29 19:18:41 +00:00
Poul-Henning Kamp
b697270ad8 Make sure we don't pass garbage to the kernel.
The filesystem is named "ufs" not "ffs".
2004-12-08 11:54:50 +00:00
Dag-Erling Smørgrav
a1b99708d0 Style nit in previous commit. 2004-01-27 19:28:13 +00:00
Kirk McKusick
cea1849767 Preserve acls option on mounts when taking a snapshot.
Submitted by:	Wiktor Niesiobedzki <freebsd-lists@w.evip.pl>
2004-01-27 18:28:11 +00:00
Kirk McKusick
d62e006473 Check that the user running mksnap_ffs has permission to create and
remove a snapshot file from the directory in which they have requested
to have it made. If they do not have write permission in the directory
or the directory is sticky and not owned by the user, then they
will not be able to remove the snapshot when they are done with it.
2003-11-04 07:04:01 +00:00
Tom Rhodes
201747dffc style(9): sort functions. 2003-10-29 21:23:44 +00:00
Tom Rhodes
91b6ac7c44 Properly prototype C function usage().
Sync usage() with the manual page: s/file/snapshot_name/g.
2003-10-29 21:21:09 +00:00
Kirk McKusick
6d540f8137 Close out a possible race where anybody in group operator could
chown an arbitrary file to operator.

Reported by:	Ian Dowse <iedowse@maths.tcd.ie>
Sponsored by:   DARPA & NAI Labs.
2003-03-02 08:07:57 +00:00
Kirk McKusick
d35ae777f2 Add the mksnap_ffs command to the sbin directory. This setuid root
program allows users in the operator group to take filesystem
snapshots. Its first use will be in support of `dump -L'.

Approved by:	Technical Review Board <trb@FreeBSD.org>
Sponsored by:   DARPA & NAI Labs.
2003-03-02 01:50:33 +00:00