Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2005 Pekka Riikonen
+ Copyright (C) 1997 - 2006 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
{
regex_t preg;
int ret = FALSE;
-
+
if (regcomp(&preg, regex, REG_NOSUB | REG_EXTENDED) != 0)
return FALSE;
char *silc_get_username()
{
char *logname = NULL;
-
+
logname = getenv("LOGNAME");
if (!logname) {
logname = getlogin();
logname = pw->pw_name;
}
}
-
+
return strdup(logname);
}
{
char *realname = NULL;
struct passwd *pw;
-
+
pw = getpwuid(getuid());
if (!pw)
return strdup("No Name");
{
return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
}
-