<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>Andrew Price pushed to branch master at <a href="https://projects.sucs.org/arthur/mw">Justin Mitchell / mw</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://projects.sucs.org/arthur/mw/commit/80db61895ab8ec0e90c95ae3ccbe83ab1c70a08e">80db6189</a></strong>
<div>
<span>by Andrew Price</span>
<i>at 2015-11-11T03:00:25Z</i>
</div>
<pre class='commit-message'>Make the default mwserv user configurable

Also get rid of some unnecessary global variables.</pre>
</li>
</ul>
<h4>2 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
src/server/mwserv.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
src/webclient/mwpoll.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://projects.sucs.org/arthur/mw/commit/80db61895ab8ec0e90c95ae3ccbe83ab1c70a08e#diff-0'>
<strong>
src/server/mwserv.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/src/server/mwserv.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/src/server/mwserv.c
</span><span style="color: #aaaaaa">@@ -14,10 +14,6 @@
</span> #include <mwcfg.h>
 #include "servsock.h"
 
<span style="color: #000000;background-color: #ffdddd">-/* unused, but necessary to link other util functions */
-int idle = 0;
-int internet = 0;
-
</span> #define MWUSER "mw"
 #define MWSERVCONF "mwserv.conf"
 
<span style="color: #aaaaaa">@@ -43,6 +39,7 @@ static void usage(char *name)
</span> static const struct cfg_default_opt defcfgs[] = {
        CFG_OPT(BOOL, "foreground", 0),
        CFG_OPT(INT, "port", 9999),
<span style="color: #000000;background-color: #ddffdd">+        CFG_OPT(STR, "user", MWUSER),
</span>   CFG_END
 };
 
<span style="color: #aaaaaa">@@ -162,9 +159,10 @@ int main(int argc, char **argv)
</span>   }
 
        if (geteuid() == 0) {
<span style="color: #000000;background-color: #ffdddd">-                struct passwd *pwbuff = getpwnam(MWUSER);
</span><span style="color: #000000;background-color: #ddffdd">+           const char *user = cfg_get_string("user");
+               struct passwd *pwbuff = getpwnam(user);
</span>           if (!pwbuff) {
<span style="color: #000000;background-color: #ffdddd">-                        fprintf(stderr, "Username %s does not exist.\n", MWUSER);
</span><span style="color: #000000;background-color: #ddffdd">+                   fprintf(stderr, "Username %s does not exist.\n", user);
</span>                   return 1;
                }
                if (setgid(pwbuff->pw_gid)) {
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://projects.sucs.org/arthur/mw/commit/80db61895ab8ec0e90c95ae3ccbe83ab1c70a08e#diff-1'>
<strong>
src/webclient/mwpoll.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/src/webclient/mwpoll.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/src/webclient/mwpoll.c
</span><span style="color: #aaaaaa">@@ -14,10 +14,6 @@
</span> struct user me;
 struct user *user = &me;
 
<span style="color: #000000;background-color: #ffdddd">-/* unused */
-int internet = 0;
-int idle = 0;
-
</span> #define DEFAULT_IDLE 60
 int clientidle = DEFAULT_IDLE;
 time_t lastcomm = 0;
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://projects.sucs.org/arthur/mw/commit/80db61895ab8ec0e90c95ae3ccbe83ab1c70a08e">View it on GitLab</a>
<br>
You're receiving this email because of your account on <a href="https://projects.sucs.org/">projects.sucs.org</a>.
If you'd like to receive fewer emails, you can adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://projects.sucs.org/arthur/mw/commit/80db61895ab8ec0e90c95ae3ccbe83ab1c70a08e"}}</script>
</p>
</div>
</body>
</html>