tmp files

Artur Frysiak wiget at t17.ds.pwr.wroc.pl
Thu Apr 15 13:08:39 CEST 1999


Hi
Pinfo create tmp files in very unsecured way.
>From mutt:
Tempdir = safe_strdup ((p = getenv ("TMPDIR")) ? p : "/tmp");
My idea:
if (!p = getenv ("TMPDIR")) {
	if (~/tmp is writeable) {
		p = "~/tmp";
	} else {
		p= "/tmp";
	}
}
strncat(p,"/pinfoXXXXXX",P_LEN);
tmpfilename = mktemp(p);

Wiget
-- 
  __    __ _            _
 / / /\ \ (_) __ _  ___| |_  @__mail:  Artur Frysiak
 \ \/  \/ / |/ _` |/ _ \ __|            Rudlice 10
  \  /\  /| | (_| |  __/ |_           98-311 Ostrowek
   \/  \/ |_|\__, |\___|\__|
             |___/           email:   Wiget at t17.ds.pwr.wroc.pl
PGP key: http://www.t17.ds.pwr.wroc.pl/~wiget/pgp.key
Fingerprint16 = 70 DB E0 2D 12 AB C7 31  B6 58 B5 61 B3 98 B6 E6



More information about the pld-pinfo mailing list