smdev

suckless mdev
git clone git://git.suckless.org/smdev
Log | Files | Refs | README | LICENSE

config.def.h (3248B)


      1 /* See LICENSE file for copyright and license details. */
      2 struct rule {
      3 	const char *devregex;
      4 	const char *user;
      5 	const char *group;
      6 	int mode;
      7 	const char *path;
      8 	const char *cmd;
      9 } rules[] = {
     10 	{ "null",         "root", "root",  0666, NULL,      NULL                           },
     11 	{ "zero",         "root", "root",  0666, NULL,      NULL                           },
     12 	{ "full",         "root", "root",  0666, NULL,      NULL                           },
     13 	{ "random",       "root", "root",  0666, NULL,      NULL                           },
     14 	{ "urandom",      "root", "root",  0444, NULL,      NULL                           },
     15 	{ "hwrandom",     "root", "root",  0660, NULL,      NULL                           },
     16 	{ "mem",          "root", "root",  0640, NULL,      NULL                           },
     17 	{ "kmem",         "root", "root",  0640, NULL,      NULL                           },
     18 	{ "port",         "root", "root",  0640, NULL,      NULL                           },
     19 	{ "console",      "root", "tty",   0600, NULL,      NULL                           },
     20 	{ "ptmx",         "root", "tty",   0666, NULL,      NULL                           },
     21 	{ "tty",          "root", "tty",   0666, NULL,      NULL                           },
     22 	{ "tty[0-9]",     "root", "root",  0600, NULL,      NULL                           },
     23 	{ "tty[0-9][0-9]","root", "tty",   0660, NULL,      NULL                           },
     24 	{ "ttyS[0-9]*",   "root", "tty",   0660, NULL,      NULL,                          },
     25 	{ "pty.*",        "root", "tty",   0660, NULL,      NULL                           },
     26 	{ "vcs[0-9]*",    "root", "tty",   0660, NULL,      NULL                           },
     27 	{ "vcsa*[0-9]*",  "root", "tty",   0660, NULL,      NULL                           },
     28 	{ "sd[a-z].*",    "root", "disk",  0660, NULL,      NULL                           },
     29 	{ "sr[0-9]*",     "root", "cdrom", 0660, NULL,      "@ln -sf $DEVNAME /dev/cdrom"  },
     30 	{ "ts[0-9]+",     "root", "root",  0640, "=input/", NULL                           },
     31 	{ "input/.*",     "root", "root",  0640, "=input/", NULL                           },
     32 	{ "dri/.*",       "root", "video", 0660, "=dri/",   NULL                           },
     33 	{ "snd/.*",       "root", "audio", 0660, "=snd/",   NULL                           },
     34 	{ "midi.*",       "root", "audio", 0660, "=snd/",   NULL                           },
     35 	{ "seq",          "root", "audio", 0660, "=snd/",   NULL                           },
     36 	{ "timer",        "root", "audio", 0660, "=snd/",   NULL                           },
     37 	{ "rtc[0-9]*",    "root", "root",  0664, NULL,      NULL                           },
     38 	{ "vbi[0-9]",     "root", "video", 0660, NULL,      NULL                           },
     39 	{ "video[0-9]",   "root", "video", 0660, NULL,      NULL                           },
     40 	{ "fuse",         "root", "root",  0666, NULL,      NULL                           },
     41 	{ ".*",           "root", "root",  0660, NULL,      NULL                           },
     42 };
     43 
     44 /* Fill into this table if you want to rename the network interface
     45  * identified by `mac' to `name'.  By default no such renaming takes
     46  * place.
     47  */
     48 struct mac2name {
     49 	unsigned char mac[6];
     50 	const char *name;
     51 } mac2names[] = {
     52 	{ .mac = { 0 }, .name = NULL }
     53 };