[hackers] [ubase] OK we had our fun, now remove the randquotes from su.c || sin

From: <git_AT_suckless.org>
Date: Thu, 05 Jun 2014 18:43:14 +0200

commit 9716ca2c7ad8a1af9e0a764cfa11613431337c31
Author: sin <sin_AT_2f30.org>
Date: Thu Jun 5 17:38:38 2014 +0100

    OK we had our fun, now remove the randquotes from su.c

diff --git a/su.c b/su.c
index 8c8d21c..20adfad 100644
--- a/su.c
+++ b/su.c
_AT_@ -8,13 +8,11 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#include <time.h>
 #include "config.h"
 #include "util.h"
 
 extern char **environ;
 
-static const char *randreply(void);
 static int dologin(struct passwd *);
 
 static void
_AT_@ -54,8 +52,6 @@ main(int argc, char *argv[])
         else
                 usage();
 
- srand(time(NULL));
-
         errno = 0;
         pw = getpwnam(usr);
         if (errno)
_AT_@ -99,7 +95,7 @@ main(int argc, char *argv[])
                         if (!cryptpass)
                                 eprintf("crypt:");
                         if (strcmp(cryptpass, spw->sp_pwdp) != 0)
- eprintf(randreply());
+ eprintf("incorrect password
");
                 }
         } else {
                 if (uid) {
_AT_@ -145,26 +141,6 @@ dosu:
         return EXIT_SUCCESS;
 }
 
-static const char *
-randreply(void)
-{
- static const char *replies[] = {
- "Time flies like an arrow, fruit flies like a banana.
",
- "Denied.
",
- "You type like a dairy farmer.
",
- "CChheecckk yyoouurr dduupplleexx sswwiittcchh..
",
- "I met a girl with 12 nipples, it sounds weird dozen tit?
",
- "Here I am, brain the size of a planet and they ask me to keep hashing rubbish.
",
- "Clones are people two.
",
- "Your mom is an interesting su response.
",
- "no.
",
- "Your mom forgot to null-terminate???B?33??Abort (core dumped)
",
- "A fool-proof method for sculpting an elephant: first, get a huge block of marble; then you chip away everything that doesn't look like an elephant.
",
- "Bloating .data for fun and profit.
",
- };
- return replies[rand() % LEN(replies)];
-}
-
 static int
 dologin(struct passwd *pw)
 {
Received on Thu Jun 05 2014 - 18:43:14 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 05 2014 - 18:48:16 CEST