diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-05-11 06:38:36 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-05-11 06:38:36 +0000 |
commit | 3dfc0c847240ac7e12c39f4ed9c31a888949ade1 (patch) | |
tree | 305f006b62ed9dcdca0f751dbf40d2a34ee054df /source3/include | |
parent | ffc88e2d26217f99c34ce24c0836bec3c809ca1a (diff) | |
download | samba-3dfc0c847240ac7e12c39f4ed9c31a888949ade1.tar.gz samba-3dfc0c847240ac7e12c39f4ed9c31a888949ade1.tar.bz2 samba-3dfc0c847240ac7e12c39f4ed9c31a888949ade1.zip |
changed to use slprintf() instead of sprintf() just about
everywhere. I've implemented slprintf() as a bounds checked sprintf()
using mprotect() and a non-writeable page.
This should prevent any sprintf based security holes.
(This used to be commit ee09e9dadb69aaba5a751dd20ccc6d587d841bd6)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/includes.h | 1 | ||||
-rw-r--r-- | source3/include/proto.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index e5076c6f39..44ed317ae9 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -237,6 +237,7 @@ Here come some platform specific sections #define USE_SETSID #define HAVE_BZERO #define HAVE_MEMMOVE +#define HAVE_VSNPRINTF #define USE_SIGPROCMASK #define USE_WAITPID #define USE_SYSV_IPC diff --git a/source3/include/proto.h b/source3/include/proto.h index c9ca7a5ea6..833794a4fb 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1806,6 +1806,11 @@ BOOL machine_password_delete( char *domain, char *name ); BOOL get_machine_account_password( unsigned char *ret_pwd, time_t *pass_last_set_time); BOOL set_machine_account_password( unsigned char *md4_new_pwd); +/*The following definitions come from snprintf.c */ + +int vslprintf(char *str, int n, char *format, va_list ap); +int slprintf(char *str, int n, char *format, ...); + /*The following definitions come from status.c */ void Ucrit_addUsername(pstring username); |