summaryrefslogtreecommitdiffstats
path: root/source/lib/slprintf.c
Commit message (Collapse)AuthorAgeFilesLines
* added fdprintf()Andrew Tridgell2000-04-161-0/+30
| | | | | | | this is like fprintf() but operates on a file descriptor combined with file_load_lines() this makes it really easy to get rid of the use of fopen() in Samba.
* added a vsnprintf() implementation from cvslock. See the notes on theAndrew Tridgell1998-10-261-45/+0
| | | | | | | | license at the top of lib/snprintf.c I've always been slightly uneasy about our half-baked vslprintf() implementation and the risks on platforms that don't have vsnprintf() so when I saw this code in another GPLd package I wanted it for Samba.
* merge from the autoconf2 branch to the main branchAndrew Tridgell1998-07-291-2/+2
|
* fix slprintf for sunos4 in head branchAndrew Tridgell1998-05-201-1/+2
|
* chgpasswd.c: Changed back to getsmb... from getsam...Jeremy Allison1998-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | ldap.c: Stoped dummy_function being prototyped. loadparm.c: Fixed slprintf sizes. nisppass.c: Fixed safe_strcpy sizes. nmbd_processlogon.c: Changed back to getsmb... from getsam... nttrans.c: Just a dump of new code. passdb.c: Moved stuff around a lot - stopped any lookups by rid. This needs to be indirected through a function table (soon). password.c: Changed back to getsmb... from getsam... reply.c: Changed back to getsmb... from getsam... slprintf.c: Fixed prototype problems. smb.h: Fixed prototype problems. smbpass.c: Changed to getsmbfile.... smbpasswd.c: Changed back to getsmb... from getsam... lib/rpc/server/srv_netlog.c: Changed back to getsmb... from getsam... lib/rpc/server/srv_samr.c: Fixed rid lookup - use uid or gid lookup. lib/rpc/server/srv_util.c: Changed back to getsmb... from getsam... Jeremy.
* a new slprintf() function. This one is totally portable but a bit of aAndrew Tridgell1998-05-121-27/+41
| | | | | | | | | | | | | | | | | | kludge. It is a safe kludge with our current code but I would like to revisit it at some point in the future. The problem with the one I committed yesterday is it used non-portable functions. (it also had a bug in it, but that's another matter) This one works by just using vsprintf() into a 8k buffer and a memcpy from there. No memory protection tricks or other non-portable stuff. This is safe because all calls to slprintf() in samba use strings which have been through a pstrcpy and thus are less than 1024 bytes. No call uses more than 2 of these strings. See what I mean by kludge? Note that the 8k is way overkill but I like overkill :) Someday (after autoconf) we will replace this with something better, but meanwhile this is simple, secure and portable.
* This is a security audit change of the main source.Jeremy Allison1998-05-121-0/+8
| | | | | | | | | | | | | | | | | | It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy.
* changed to use slprintf() instead of sprintf() just aboutAndrew Tridgell1998-05-111-0/+88
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.