This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Undernet IRC Server Source Code.".

The branch, u2_10_12_branch has been updated
       via  ae45881f2542b3a063f2ba6940521dfe8a143885 (commit)
       via  61f27dc5781e39d4442bbab0d0b467cf80677056 (commit)
       via  3b1474d0e1ad8dfbddee289fa67ca1e1ba483e8e (commit)
       via  fcecbb708da4c3526fd967b2479a7ebfa0ce0fa6 (commit)
       via  aeb57c8818975ced81f75af184e7dae8fab84c52 (commit)
       via  a99142666b48a43a649561ced645551d105fc407 (commit)
      from  3e4820447621d9f7dca5dc2d2348516f14c345cb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ae45881f2542b3a063f2ba6940521dfe8a143885
Author: Michael Poole <[email protected]>
Date:   Fri Jan 6 21:22:49 2017 -0500

    ms_xreply: Simplify the iauth forwarding code.

diff --git a/ircd/m_xreply.c b/ircd/m_xreply.c
index 8a3da48..6ee05f6 100644
--- a/ircd/m_xreply.c
+++ b/ircd/m_xreply.c
@@ -126,12 +126,9 @@ int ms_xreply(struct Client* cptr, struct Client* sptr, 
int parc, char* parv[])
   }
 
   /* OK, figure out where to route the message */
-  if (!ircd_strncmp("iauth:", routing, 6)) {
-    /* Forward the reply to the iauth */
-    routing += 6;
-
-    auth_send_xreply(sptr, routing, reply);
-  } else
+  if (!ircd_strncmp("iauth:", routing, 6))
+    auth_send_xreply(sptr, routing + 6, reply);
+  else
     /* If we don't know where to route it, log it and drop it */
     log_write(LS_SYSTEM, L_NOTICE, 0, "Received unroutable extension reply "
              "from %#C to %#C routing %s; message: %s", sptr, acptr,
commit 61f27dc5781e39d4442bbab0d0b467cf80677056
Author: Michael Poole <[email protected]>
Date:   Fri Jan 6 21:22:28 2017 -0500

    iauth_do_spawn: Unify cut-and-paste error handling.
    
    Also make sure to clear iauth->i_socket->s_fd on failure.

diff --git a/ircd/s_auth.c b/ircd/s_auth.c
index 256853c..1c9a3cd 100644
--- a/ircd/s_auth.c
+++ b/ircd/s_auth.c
@@ -1362,9 +1362,7 @@ int iauth_do_spawn(struct IAuth *iauth, int automatic)
   if (!res) {
     res = errno;
     Debug((DEBUG_INFO, "Unable to make IAuth socket non-blocking: %s", 
strerror(res)));
-    close(s_io[1]);
-    close(s_io[0]);
-    return res;
+    goto fail_1;
   }
 
   /* Initialize the socket structure to talk to the child. */
@@ -1373,9 +1371,7 @@ int iauth_do_spawn(struct IAuth *iauth, int automatic)
   if (!res) {
     res = errno;
     Debug((DEBUG_INFO, "Unable to register IAuth socket: %s", strerror(res)));
-    close(s_io[1]);
-    close(s_io[0]);
-    return res;
+    goto fail_1;
   }
 
   /* Allocate another pair for stderr. */
@@ -1383,10 +1379,7 @@ int iauth_do_spawn(struct IAuth *iauth, int automatic)
   if (res) {
     res = errno;
     Debug((DEBUG_INFO, "Unable to create IAuth stderr: %s", strerror(res)));
-    socket_del(i_socket(iauth));
-    close(s_io[1]);
-    close(s_io[0]);
-    return res;
+    goto fail_2;
   }
 
   /* Mark parent side of this pair non-blocking, too. */
@@ -1394,12 +1387,7 @@ int iauth_do_spawn(struct IAuth *iauth, int automatic)
   if (!res) {
     res = errno;
     Debug((DEBUG_INFO, "Unable to make IAuth stderr non-blocking: %s", 
strerror(res)));
-    close(s_err[1]);
-    close(s_err[0]);
-    socket_del(i_socket(iauth));
-    close(s_io[1]);
-    close(s_io[0]);
-    return res;
+    goto fail_3;
   }
 
   /* And set up i_stderr(iauth). */
@@ -1408,12 +1396,7 @@ int iauth_do_spawn(struct IAuth *iauth, int automatic)
   if (!res) {
     res = errno;
     Debug((DEBUG_INFO, "Unable to register IAuth stderr: %s", strerror(res)));
-    close(s_err[1]);
-    close(s_err[0]);
-    socket_del(i_socket(iauth));
-    close(s_io[1]);
-    close(s_io[0]);
-    return res;
+    goto fail_3;
   }
 
   /* Attempt to fork a child process. */
@@ -1423,9 +1406,14 @@ int iauth_do_spawn(struct IAuth *iauth, int automatic)
     res = errno;
     Debug((DEBUG_INFO, "Unable to fork IAuth child: %s", strerror(res)));
     socket_del(i_stderr(iauth));
+    s_fd(i_stderr(iauth)) = -1;
+  fail_3:
     close(s_err[1]);
     close(s_err[0]);
+  fail_2:
     socket_del(i_socket(iauth));
+    s_fd(i_socket(iauth)) = -1;
+  fail_1:
     close(s_io[1]);
     close(s_io[0]);
     return res;
commit 3b1474d0e1ad8dfbddee289fa67ca1e1ba483e8e
Author: Michael Poole <[email protected]>
Date:   Fri Jan 6 21:21:25 2017 -0500

    auth_spoof_user: Check G-line and connection class for client.

diff --git a/ircd/s_auth.c b/ircd/s_auth.c
index 287bb8d..256853c 100644
--- a/ircd/s_auth.c
+++ b/ircd/s_auth.c
@@ -1315,6 +1315,9 @@ int auth_spoof_user(struct AuthRequest *auth, const char 
*username, const char *
     return exit_client(sptr, sptr, &me,
                        (killreason == -1 ? "K-lined" : "G-lined"));
   }
+  FlagSet(&auth->flags, AR_GLINE_CHECKED);
+  if (preregister_user(auth->client))
+    return CPTR_KILLED;
 
   start_iauth_query(auth);
   sendto_iauth(sptr, "N %s", hostname);
commit fcecbb708da4c3526fd967b2479a7ebfa0ce0fa6
Author: Michael Poole <[email protected]>
Date:   Fri Jan 6 21:21:07 2017 -0500

    check_auth_finished: Only check G-lines (etc.) for client ports.

diff --git a/ircd/s_auth.c b/ircd/s_auth.c
index 3d84a74..287bb8d 100644
--- a/ircd/s_auth.c
+++ b/ircd/s_auth.c
@@ -422,7 +422,8 @@ static int check_auth_finished(struct AuthRequest *auth, 
int bitclr)
   if (bitclr != AR_IAUTH_SOFT_DONE)
     FlagClr(&auth->flags, bitclr);
 
-  if (!FlagHas(&auth->flags, AR_GLINE_CHECKED))
+  if (IsUserPort(auth->client)
+      && !FlagHas(&auth->flags, AR_GLINE_CHECKED))
   {
     struct User   *user;
     struct Client *sptr;
@@ -434,18 +435,13 @@ static int check_auth_finished(struct AuthRequest *auth, 
int bitclr)
       return 0;
 
     /* If appropriate, do preliminary assignment to Client block. */
-    if (IsUserPort(auth->client)
-        && preregister_user(auth->client))
+    if (preregister_user(auth->client))
       return CPTR_KILLED;
 
     /* Copy username to struct User.username for kill checking. */
     sptr = auth->client;
     user = cli_user(sptr);
-    if (IsServerPort(sptr) || IsServer(sptr))
-    {
-      /* servers don't get username assignments */
-    }
-    else if (IsGotId(sptr))
+    if (IsGotId(sptr))
     {
       clean_username(user->username, cli_username(sptr));
     }
commit aeb57c8818975ced81f75af184e7dae8fab84c52
Author: Michael Poole <[email protected]>
Date:   Fri Jan 6 21:19:40 2017 -0500

    IsIdented: Rename to IsGotId for consistency.

diff --git a/include/client.h b/include/client.h
index 3d62cc7..31dc294 100644
--- a/include/client.h
+++ b/include/client.h
@@ -561,7 +561,7 @@ struct Client {
 /** Return non-zero if the client has been IP-checked for clones. */
 #define IsIPChecked(x)          HasFlag(x, FLAG_IPCHECK)
 /** Return non-zero if we have received an ident response for the client. */
-#define IsIdented(x)            HasFlag(x, FLAG_GOTID)
+#define IsGotId(x)              HasFlag(x, FLAG_GOTID)
 /** Return non-zero if the client has set mode +i (invisible). */
 #define IsInvisible(x)          HasFlag(x, FLAG_INVISIBLE)
 /** Return non-zero if the client caused a net.burst. */
diff --git a/ircd/s_auth.c b/ircd/s_auth.c
index 2daf18b..3d84a74 100644
--- a/ircd/s_auth.c
+++ b/ircd/s_auth.c
@@ -263,7 +263,7 @@ static int auth_set_username(struct AuthRequest *auth)
   {
     ircd_strncpy(user->username, cli_username(sptr), USERLEN);
   }
-  else if (IsIdented(sptr))
+  else if (IsGotId(sptr))
   {
     clean_username(user->username, cli_username(sptr));
   }
@@ -339,7 +339,7 @@ static int auth_set_username(struct AuthRequest *auth)
 badid:
   /* If we confirmed their username, and it is what they claimed,
    * accept it. */
-  if (IsIdented(sptr) && !strcmp(cli_username(sptr), user->username))
+  if (IsGotId(sptr) && !strcmp(cli_username(sptr), user->username))
     return 0;
 
   ServerStats->is_ref++;
@@ -445,7 +445,7 @@ static int check_auth_finished(struct AuthRequest *auth, 
int bitclr)
     {
       /* servers don't get username assignments */
     }
-    else if (IsIdented(sptr))
+    else if (IsGotId(sptr))
     {
       clean_username(user->username, cli_username(sptr));
     }
diff --git a/ircd/s_misc.c b/ircd/s_misc.c
index dcd08e2..6f527aa 100644
--- a/ircd/s_misc.c
+++ b/ircd/s_misc.c
@@ -167,7 +167,7 @@ const char* get_client_name(const struct Client* sptr, int 
showip)
   if (!MyConnect(sptr) || !showip)
     return cli_name(sptr);
   ircd_snprintf(0, nbuf, sizeof(nbuf), "%s[%s@%s]", cli_name(sptr),
-                IsIdented(sptr) ? cli_username(sptr) : "",
+                IsGotId(sptr) ? cli_username(sptr) : "",
                 cli_sock_ip(sptr));
   return nbuf;
 }
commit a99142666b48a43a649561ced645551d105fc407
Author: Michael Poole <[email protected]>
Date:   Thu Jan 5 22:15:19 2017 -0500

    stats_configured_links: Display empty and null strings as empty.

diff --git a/ircd/s_stats.c b/ircd/s_stats.c
index 7007373..6cf5f0c 100644
--- a/ircd/s_stats.c
+++ b/ircd/s_stats.c
@@ -86,7 +86,7 @@ static void
 stats_configured_links(struct Client *sptr, const struct StatDesc* sd,
                        char* param)
 {
-  static char null[] = "<NULL>";
+  static char null[] = "";
   struct ConfItem *tmp;
   unsigned short int port;
   int maximum;
@@ -96,10 +96,10 @@ stats_configured_links(struct Client *sptr, const struct 
StatDesc* sd,
   {
     if ((tmp->status & sd->sd_funcdata))
     {
-      host = BadPtr(tmp->host) ? null : tmp->host;
-      name = BadPtr(tmp->name) ? null : tmp->name;
-      username = BadPtr(tmp->username) ? null : tmp->username;
-      hub_limit = BadPtr(tmp->hub_limit) ? null : tmp->hub_limit;
+      host = tmp->host ? tmp->host : null;
+      name = tmp->name ? tmp->name : null;
+      username = tmp->username ? tmp->username : null;
+      hub_limit = tmp->hub_limit ? tmp->hub_limit : null;
       maximum = tmp->maximum;
       port = tmp->address.port;
 
-----------------------------------------------------------------------

Summary of changes:
 include/client.h |    2 +-
 ircd/m_xreply.c  |    9 +++------
 ircd/s_auth.c    |   51 +++++++++++++++++++--------------------------------
 ircd/s_misc.c    |    2 +-
 ircd/s_stats.c   |   10 +++++-----
 5 files changed, 29 insertions(+), 45 deletions(-)


hooks/post-receive
-- 
Undernet IRC Server Source Code.
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to