errors on systems where they would not otherwise be compiled.
No warnings from splint.
# Default cppcheck options when run from the top-level Makefile
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -Dva_copy=va_copy -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX -U__NBBY -DNSIG=64
+# Default splint options when run from the top-level Makefile
+SPLINT_OPTS = -D__restrict= -checks
+
all: config.status
for d in $(SUBDIRS); do \
(cd $$d && exec $(MAKE) $@) && continue; \
done; \
exit $$rval
+splint: config.status
+ rval=0; \
+ for d in $(SUBDIRS); do \
+ echo splinting $$d; \
+ (cd $$d && exec $(MAKE) SPLINT_OPTS="$(SPLINT_OPTS)" $@) || rval=`expr $$rval + $$?`; \
+ done; \
+ exit $$rval
+
install-dirs install-binaries install-includes install-plugin: config.status pre-install
for d in $(SUBDIRS); do \
(cd $$d && exec $(MAKE) "INSTALL_OWNER=$(INSTALL_OWNER)" $@) && continue; \
$(DESTDIR)$(mandirform)/sudoers.$(mansectform) \
$(DESTDIR)$(mandirform)/sudoers.ldap.$(mansectform)
+splint:
+
cppcheck:
check:
uninstall:
-rm -rf $(DESTDIR)$(exampledir)
+splint:
+
cppcheck:
check:
uninstall:
-rm -f $(DESTDIR)$(includedir)/sudo_plugin.h
+splint:
+
cppcheck:
check:
# cppcheck options, usually set in the top-level Makefile
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -Dva_copy=va_copy -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX -U__NBBY -DNSIG=64
+# splint options, usually set in the top-level Makefile
+SPLINT_OPTS = -D__restrict= -checks
+
# Regression tests
TEST_PROGS = atofoo_test conf_test hltq_test parseln_test progname_test @COMPAT_TEST_PROGS@
TEST_LIBS = @LIBS@
uninstall:
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libexecdir)/sudo/libsudo_util.la
+splint:
+ splint $(SPLINT_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c
+
cppcheck:
cppcheck $(CPPCHECK_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c
uninstall:
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libexecdir)/sudo/libsudo_z.la
+splint:
+
cppcheck:
check:
# cppcheck options, usually set in the top-level Makefile
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -Dva_copy=va_copy -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX -U__NBBY -DNSIG=64
+# splint options, usually set in the top-level Makefile
+SPLINT_OPTS = -D__restrict= -checks
+
# Where to install things...
prefix = @prefix@
exec_prefix = @exec_prefix@
-$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(plugindir)/group_file.la
-rm -f $(DESTDIR)$(plugindir)/group_file.so~
+splint:
+ splint $(SPLINT_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c
+
cppcheck:
cppcheck $(CPPCHECK_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c
# cppcheck options, usually set in the top-level Makefile
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -Dva_copy=va_copy -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX -U__NBBY -DNSIG=64
+# splint options, usually set in the top-level Makefile
+SPLINT_OPTS = -D__restrict= -checks
+
# Where to install things...
prefix = @prefix@
exec_prefix = @exec_prefix@
-$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(plugindir)/sample_plugin.la
-rm -f $(DESTDIR)$(plugindir)/sample_plugin.so~
+splint:
+ splint $(SPLINT_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c
+
cppcheck:
cppcheck $(CPPCHECK_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c
# cppcheck options, usually set in the top-level Makefile
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -Dva_copy=va_copy -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX -U__NBBY -DNSIG=64
+# splint options, usually set in the top-level Makefile
+SPLINT_OPTS = -D__restrict= -checks
+
# Where to install things...
prefix = @prefix@
exec_prefix = @exec_prefix@
-cmp $(DESTDIR)$(sudoersdir)/sudoers $(srcdir)/sudoers >/dev/null && \
rm -f $(DESTDIR)$(sudoersdir)/sudoers
+splint:
+ splint $(SPLINT_OPTS) -I$(incdir) -I$(top_builddir) -I$(devdir) -I$(srcdir) -I$(top_srcdir) $(srcdir)/*.c $(srcdir)/auth/*.c
+
cppcheck:
cppcheck $(CPPCHECK_OPTS) -I$(incdir) -I$(top_builddir) -I$(devdir) -I$(srcdir) -I$(top_srcdir) $(srcdir)/*.c $(srcdir)/auth/*.c
#include <config.h>
+#ifdef HAVE_AFS
+
#include <sys/types.h>
#include <stdio.h>
#ifdef STDC_HEADERS
debug_return_int(AUTH_FAILURE);
}
+
+#endif HAVE_AFS
#include <config.h>
+#ifdef HAVE_AIXAUTH
+
#include <sys/types.h>
#include <stdio.h>
#ifdef STDC_HEADERS
debug_return_int(AUTH_SUCCESS);
}
+
+#endif /* HAVE_AIXAUTH */
#include <config.h>
+#ifdef HAVE_BSD_AUTH_H
+
#include <sys/types.h>
#include <stdio.h>
#ifdef STDC_HEADERS
debug_return_int(AUTH_SUCCESS);
}
+
+#endif /* HAVE_BSD_AUTH_H */
#include <config.h>
+#ifdef HAVE_DCE
+
#include <sys/types.h>
#include <stdio.h>
#ifdef STDC_HEADERS
(void) fprintf(stderr, "%s %s\n", comment, error_string);
debug_return_int(1);
}
+
+#endif /* HAVE_DCE */
#include <config.h>
+#ifdef HAVE_FWTK
+
#include <sys/types.h>
#include <stdio.h>
#ifdef STDC_HEADERS
auth_close();
debug_return_int(AUTH_SUCCESS);
}
+
+#endif /* HAVE_FWTK */
#include <config.h>
+#ifdef HAVE_KERB5
+
#include <sys/types.h>
#include <stdio.h>
#ifdef STDC_HEADERS
debug_return_int(error);
}
#endif
+
+#endif /* HAVE_KERB5 */
#include <config.h>
+#ifdef HAVE_PAM
+
#include <sys/types.h>
#include <stdio.h>
#ifdef STDC_HEADERS
}
debug_return_int(ret);
}
+
+#endif /* HAVE_PAM */
#include <config.h>
+#if defined(HAVE_SKEY) || defined(HAVE_OPIE)
+
#include <sys/types.h>
#include <stdio.h>
#ifdef STDC_HEADERS
else
debug_return_int(AUTH_FAILURE);
}
+
+#endif /* HAVE_SKEY || HAVE_OPIE */
#include <config.h>
+#ifdef HAVE_GETPRPWNAM
+
#include <sys/types.h>
#include <stdio.h>
#ifdef STDC_HEADERS
}
debug_return_int(AUTH_SUCCESS);
}
+
+#endif /* HAVE_GETPRPWNAM */
#include <config.h>
+#ifdef HAVE_SECURID
+
#include <sys/types.h>
#include <stdio.h>
#ifdef STDC_HEADERS
/* Return stored state to calling process */
debug_return_int(rval);
}
+
+#endif /* HAVE_SECURID */
#include <config.h>
+#ifdef HAVE_SIA_SES_INIT
+
#include <sys/types.h>
#include <stdio.h>
#ifdef STDC_HEADERS
sudo_efree(sudo_argv);
debug_return_int(AUTH_SUCCESS);
}
+
+#endif /* HAVE_SIA_SES_INIT */
#include <config.h>
+#ifdef HAVE_BSM_AUDIT
+
#include <sys/types.h>
#include <bsm/audit.h>
}
debug_return_int(0);
}
+
+#endif /* HAVE_BSM_AUDIT */
#include <config.h>
+#ifdef HAVE_LINUX_AUDIT
+
#include <sys/types.h>
#include <stdio.h>
#ifdef STDC_HEADERS
debug_return_int(rc);
}
+
+#endif /* HAVE_LINUX_AUDIT */
#include <config.h>
+#ifdef HAVE_SOLARIS_AUDIT
+
#include <sys/types.h>
#include <stdarg.h>
#include <stdio.h>
return 0;
}
+
+#endif /* HAVE_SOLARIS_AUDIT */
#include <config.h>
+#ifdef HAVE_SSSD
+
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
debug_return_int(count);
}
+
+#endif /* HAVE_SSSD */
# cppcheck options, usually set in the top-level Makefile
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -Dva_copy=va_copy -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX -U__NBBY -DNSIG=64
+# splint options, usually set in the top-level Makefile
+SPLINT_OPTS = -D__restrict= -checks
+
# Where to install things...
prefix = @prefix@
exec_prefix = @exec_prefix@
-$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(plugindir)/system_group.la
-rm -f $(DESTDIR)$(plugindir)/system_group.so~
+splint:
+ splint $(SPLINT_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c
+
cppcheck:
cppcheck $(CPPCHECK_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c
# cppcheck options, usually set in the top-level Makefile
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -Dva_copy=va_copy -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX -U__NBBY -DNSIG=64
+# splint options, usually set in the top-level Makefile
+SPLINT_OPTS = -D__restrict= -checks
+
# Where to install things...
prefix = @prefix@
exec_prefix = @exec_prefix@
-test -n "$(INIT_SCRIPT)" && \
rm -f $(DESTDIR)$(RC_LINK) $(DESTDIR)$(INIT_DIR)/sudo
+splint:
+ splint $(SPLINT_OPTS) -I$(incdir) -I$(top_builddir) -I. -I$(srcdir) -I$(top_srcdir) $(srcdir)/*.c
+
cppcheck:
cppcheck $(CPPCHECK_OPTS) -I$(incdir) -I$(top_builddir) -I. -I$(srcdir) -I$(top_srcdir) $(srcdir)/*.c
#include <config.h>
+#ifdef HAVE_SELINUX
+
#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
errno = serrno;
debug_return;
}
+
+#endif /* HAVE_SELINUX */