1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
From: Bastian Germann <bage@debian.org>
Date: Wed, 27 Mar 2024 21:23:35 +0000
Subject: Replace __ltostr with snprintf
---
login.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/login.c b/login.c
index 8a46a76..04a9e69 100644
--- a/login.c
+++ b/login.c
@@ -31,6 +31,7 @@
#include <unistd.h>
#include <termios.h>
#include <stdlib.h>
+#include <stdio.h>
#include <errno.h>
#include <utmp.h>
#include <fcntl.h>
@@ -119,7 +120,7 @@ main(int argc,char *argv[]) {
strlcpy(buf+len,password,512-len);
len+=strlen(password)+1;
/* buf[len++]='Y'; */
- len+=__ltostr(buf+len,512-len,time(0),10,0);
+ len+=snprintf(buf+len,512-len,"%ld",time(0));
buf[len]=0;
if (len<400) {
strcpy(buf+len+1,"nosetuid");
|