diff options
Diffstat (limited to 'hscript/user.cc')
-rw-r--r-- | hscript/user.cc | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/hscript/user.cc b/hscript/user.cc index 4d00cb2..92fed4e 100644 --- a/hscript/user.cc +++ b/hscript/user.cc @@ -13,6 +13,7 @@ #include <assert.h> #include <cstring> #include <fstream> +#include <set> #include <sstream> #include <time.h> #include "user.hh" @@ -20,6 +21,23 @@ using namespace Horizon::Keys; +const static std::set<std::string> system_names = { + "root", "bin", "daemon", "adm", "lp", "sync", "shutdown", "halt", "mail", + "news", "uucp", "operator", "man", "postmaster", "cron", "ftp", "sshd", + "at", "squid", "xfs", "games", "postgres", "cyrus", "vpopmail", "utmp", + "catchlog", "alias", "qmaild", "qmailp", "qmailq", "qmailr", "qmails", + "qmaill", "ntp", "smmsp", "guest", "nobody" +}; + +const static std::set<std::string> system_groups = { + "root", "bin", "daemon", "sys", "adm", "tty", "disk", "lp", "mem", "kmem", + "wheel", "floppy", "mail", "news", "uucp", "man", "cron", "console", + "audio", "cdrom", "dialout", "ftp", "sshd", "input", "at", "tape", "video", + "netdev", "readproc", "squid", "xfs", "kvm", "games", "shadow", "postgres", + "cdrw", "usb", "vpopmail", "users", "catchlog", "ntp", "nofiles", "qmail", + "qmaill", "smmsp", "locate", "abuild", "utmp", "ping", "nogroup", "nobody" +}; + Key *RootPassphrase::parseFromData(const std::string &data, int lineno, int *errors, int *warnings) { if(data.size() < 5 || data[0] != '$' || (data[1] != '2' && data[1] != '6') @@ -85,3 +103,73 @@ bool RootPassphrase::execute(ScriptOptions options) const { return true; /* LCOV_EXCL_STOP */ } + + +Key *Username::parseFromData(const std::string &data, int lineno, int *errors, + int *warnings) { + return nullptr; +} + +bool Username::validate(ScriptOptions) const { + return false; +} + +bool Username::execute(ScriptOptions) const { + return false; +} + + +Key *UserAlias::parseFromData(const std::string &data, int lineno, int *errors, + int *warnings) { + return nullptr; +} + +bool UserAlias::validate(ScriptOptions) const { + return false; +} + +bool UserAlias::execute(ScriptOptions) const { + return false; +} + + +Key *UserPassphrase::parseFromData(const std::string &data, int lineno, + int *errors, int *warnings) { + return nullptr; +} + +bool UserPassphrase::validate(ScriptOptions) const { + return false; +} + +bool UserPassphrase::execute(ScriptOptions) const { + return false; +} + + +Key *UserIcon::parseFromData(const std::string &data, int lineno, int *errors, + int *warnings) { + return nullptr; +} + +bool UserIcon::validate(ScriptOptions) const { + return false; +} + +bool UserIcon::execute(ScriptOptions) const { + return false; +} + + +Key *UserGroups::parseFromData(const std::string &data, int lineno, + int *errors, int *warnings) { + return nullptr; +} + +bool UserGroups::validate(ScriptOptions) const { + return false; +} + +bool UserGroups::execute(ScriptOptions) const { + return false; +} |