]> granicus.if.org Git - sudo/commitdiff
Add a zero_bytes() function to do the equivalent of bzero in such a
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 31 Dec 2003 22:46:08 +0000 (22:46 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 31 Dec 2003 22:46:08 +0000 (22:46 +0000)
way that will heopfully not be optimized away by sneaky compilers.

Makefile.in
sudo.h

index 96def17dd4da9eba3dac84bcfcd563a42504b724..26b2b397d47e0bab791420bc16dcae52bc73d107 100644 (file)
@@ -118,7 +118,7 @@ SRCS = alloc.c alloca.c check.c def_data.c defaults.c env.c err.c fileops.c \
        interfaces.c lex.yy.c lsearch.c logging.c parse.c parse.lex \
        parse.yacc set_perms.c sigaction.c snprintf.c strcasecmp.c strerror.c \
        strlcat.c strlcpy.c sudo.c sudo.tab.c testsudoers.c tgetpass.c utime.c \
-       visudo.c $(AUTH_SRCS)
+       visudo.c zero_bytes.c $(AUTH_SRCS)
 
 AUTH_SRCS = auth/afs.c auth/aix_auth.c auth/bsdauth.c auth/dce.c auth/fwtk.c \
            auth/kerb4.c auth/kerb5.c auth/pam.c auth/passwd.c auth/rfc1938.c \
@@ -136,7 +136,7 @@ PARSEOBJS = sudo.tab.o lex.yy.o alloc.o defaults.o
 
 SUDOBJS = check.o env.o getspwuid.o goodpath.o fileops.o find_path.o \
          interfaces.o logging.o parse.o set_perms.o sudo.o tgetpass.o \
-         $(AUTH_OBJS) $(PARSEOBJS)
+         zero_bytes.o $(AUTH_OBJS) $(PARSEOBJS)
 
 VISUDOBJS = visudo.o fileops.o goodpath.o find_path.o $(PARSEOBJS)
 
diff --git a/sudo.h b/sudo.h
index 31fca998cc44a912617c60717f74911b41a1e7b9..1b6c0b3f2a51fe9e91a1c763caf1498b3a26b096 100644 (file)
--- a/sudo.h
+++ b/sudo.h
@@ -226,6 +226,7 @@ int user_is_exempt  __P((void));
 void set_fqdn          __P((void));
 char *sudo_getepw      __P((struct passwd *));
 int pam_prep_user      __P((struct passwd *));
+void zero_bytes                __P((volatile VOID *, size_t));
 YY_DECL;
 
 /* Only provide extern declarations outside of sudo.c. */