]> jfr.im git - solanum.git/blobdiff - ircd/authproc.c
whowas.c: store account name in whowas (#323)
[solanum.git] / ircd / authproc.c
index 2cb21648fa364953b663023df0edc5e304dc421f..602601b042e11fb27fb6d947160a6890c70fdaf2 100644 (file)
@@ -4,7 +4,7 @@
  *
  *  Copyright (C) 2005 Aaron Sethman <androsyn@ratbox.org>
  *  Copyright (C) 2005-2012 ircd-ratbox development team
- *  Copyright (C) 2016 William Pitcock <nenolod@dereferenced.org>
+ *  Copyright (C) 2016 Ariadne Conill <ariadne@dereferenced.org>
  *
  *  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
@@ -88,24 +88,19 @@ static int
 start_authd(void)
 {
        char fullpath[PATH_MAX + 1];
-#ifdef _WIN32
-       const char *suffix = ".exe";
-#else
-       const char *suffix = "";
-#endif
+
        if(authd_path == NULL)
        {
-               snprintf(fullpath, sizeof(fullpath), "%s%cauthd%s", ircd_paths[IRCD_PATH_LIBEXEC], RB_PATH_SEPARATOR, suffix);
+               snprintf(fullpath, sizeof(fullpath), "%s/authd", ircd_paths[IRCD_PATH_LIBEXEC]);
 
                if(access(fullpath, X_OK) == -1)
                {
-                       snprintf(fullpath, sizeof(fullpath), "%s%cbin%cauthd%s",
-                                ConfigFileEntry.dpath, RB_PATH_SEPARATOR, RB_PATH_SEPARATOR, suffix);
+                       snprintf(fullpath, sizeof(fullpath), "%s/bin/authd", ConfigFileEntry.dpath);
                        if(access(fullpath, X_OK) == -1)
                        {
                                ierror("Unable to execute authd in %s or %s/bin",
                                        ircd_paths[IRCD_PATH_LIBEXEC], ConfigFileEntry.dpath);
-                               sendto_realops_snomask(SNO_GENERAL, L_ALL,
+                               sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                                       "Unable to execute authd in %s or %s/bin",
                                                       ircd_paths[IRCD_PATH_LIBEXEC], ConfigFileEntry.dpath);
                                return 1;
@@ -127,12 +122,12 @@ start_authd(void)
        if(authd_helper == NULL)
        {
                ierror("Unable to start authd helper: %s", strerror(errno));
-               sendto_realops_snomask(SNO_GENERAL, L_ALL, "Unable to start authd helper: %s", strerror(errno));
+               sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Unable to start authd helper: %s", strerror(errno));
                return 1;
        }
 
        ilog(L_MAIN, "authd helper started");
-       sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd helper started");
+       sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "authd helper started");
        rb_helper_run(authd_helper);
        return 0;
 }