From 4634e137f7c1ab4a06ae6b6e808510159be55000 Mon Sep 17 00:00:00 2001
From: David <dbphillipsnz@gmail.com>
Date: Sat, 31 May 2014 21:06:56 +1200
Subject: Added strip section to Makefile (saves 9kb heh)

---
 Makefile       | 8 ++++++++
 trayfreq_set.c | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/Makefile b/Makefile
index d6218c2..eae2be7 100644
--- a/Makefile
+++ b/Makefile
@@ -129,6 +129,14 @@ trayfreq.conf:
 		-e 's:TRAYFREQ_CONF:$(TRAYFREQ_CONF):g' \
 		trayfreq.conf.src > trayfreq.conf
 ########################################################################
+
+
+########################################################################
+# Strip all symbols from binaries
+strip:
+	strip -s trayfreq trayfreq-set
+	
+########################################################################
 	
 
 ########################################################################
diff --git a/trayfreq_set.c b/trayfreq_set.c
index 7a48af5..8f2ad72 100644
--- a/trayfreq_set.c
+++ b/trayfreq_set.c
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 #include <libintl.h>
 #include <locale.h>
 
@@ -125,6 +126,11 @@ int main(int argc, char *argv[])
 	// If unusual number of args, give up now
 	if (argc == 5)
 	{
+
+		debug ("Checking UID\n");
+		if (getuid() != 0)
+			fprintf(stderr,"Warning: running as UID %d, not 0\n",getuid() );
+
 		get_argument_summary(argc, argv, &args);
 
 		debug("Correct number of command line arguments\n");
-- 
cgit v1.1