Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/share/examples/refuse/dbfs



Module Name:    src
Committed By:   agc
Date:           Fri Feb 23 21:26:44 UTC 2007

Added Files:
        src/share/examples/refuse/dbfs: Makefile dbfs.c

Log Message:
Add dbfs, an example (re)fuse file system which mounts a Berkeley
database as a file system.

The file was created in the first place with the following commands:

        cp /etc/passwd infile
        db -E B -w -f infile -F: -C btree bdb.db

and mounted as follows:

        ./dbfs bdb.db /mnt

Example use is as follows, using a btree-based database with login
names as the key, and the rest of the passwd file entry as the value:

[21:17:20] agc@inspiron1300 ~ 142 > df -i /mnt
Filesystem        1K-blocks      Used     Avail Capacity  iused    ifree  
%iused  Mounted on
puffs:refuse:dbfs        32        32         0   100%        1        0   100% 
  /mnt
[21:17:25] agc@inspiron1300 ~ 143 > l /mnt
total 2
drwxr-xr-x   2 root  wheel     0 Jan  1  1970 .
drwxr-xr-x  29 root  wheel  1024 Jan 31 21:14 ..
-r--r--r--   1 agc   agc      55 Feb 23 14:49 _pflogd
-r--r--r--   1 agc   agc      50 Feb 23 14:49 _proxy
-r--r--r--   1 agc   agc      46 Feb 23 14:49 _rwhod
-r--r--r--   1 agc   agc      49 Feb 23 14:49 _timedc
-r--r--r--   1 agc   agc      33 Feb 23 14:49 agc
-r--r--r--   1 agc   agc      51 Feb 23 14:49 bin
-r--r--r--   1 agc   agc      40 Feb 23 14:49 daemon
-r--r--r--   1 agc   agc      46 Feb 23 14:49 games
-r--r--r--   1 agc   agc      54 Feb 23 14:49 named
-r--r--r--   1 agc   agc      56 Feb 23 14:49 nobody
-r--r--r--   1 agc   agc      53 Feb 23 14:49 ntpd
-r--r--r--   1 agc   agc      49 Feb 23 14:49 operator
-r--r--r--   1 agc   agc      55 Feb 23 14:49 postfix
-r--r--r--   1 agc   agc      32 Feb 23 14:49 root
-r--r--r--   1 agc   agc      53 Feb 23 14:49 sshd
-r--r--r--   1 agc   agc      43 Feb 23 14:49 toor
-r--r--r--   1 agc   agc      52 Feb 23 14:49 uucp
[21:17:32] agc@inspiron1300 ~ 144 > grep nologin /mnt/*
/mnt/_pflogd:*:18:18:& pseudo-user:/var/chroot/pflogd:/sbin/nologin
/mnt/_proxy:*:21:21:Proxy Services:/nonexistent:/sbin/nologin
/mnt/_rwhod:*:19:19:& pseudo-user:/var/rwho:/sbin/nologin
/mnt/_timedc:*:22:22:& pseudo-user:/nonexistent:/sbin/nologin
/mnt/bin:*:3:7:Binaries Commands and Source:/:/sbin/nologin
/mnt/daemon:*:1:1:The devil himself:/:/sbin/nologin
/mnt/games:*:7:13:& pseudo-user:/usr/games:/sbin/nologin
/mnt/named:*:14:14:& pseudo-user:/var/chroot/named:/sbin/nologin
/mnt/nobody:*:32767:39:Unprivileged user:/nonexistent:/sbin/nologin
/mnt/ntpd:*:15:15:& pseudo-user:/var/chroot/ntpd:/sbin/nologin
/mnt/operator:*:2:5:System &:/usr/guest/operator:/sbin/nologin
/mnt/postfix:*:12:12:& pseudo-user:/var/spool/postfix:/sbin/nologin
/mnt/sshd:*:16:16:& pseudo-user:/var/chroot/sshd:/sbin/nologin
/mnt/uucp:*:66:1:UNIX-to-UNIX Copy:/nonexistent:/sbin/nologin
[21:17:37] agc@inspiron1300 ~ 145 >


To generate a diff of this commit:
cvs rdiff -r0 -r1.1 src/share/examples/refuse/dbfs/Makefile \
    src/share/examples/refuse/dbfs/dbfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index