Bug 12355

Summary: bcc doesn't work because of incorrect $TMPDIR usage
Product: Sisyphus Reporter: Peter 'Nidd' Novodvorsky <nidd>
Component: dev86Assignee: placeholder <placeholder>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: major    
Priority: P4 CC: boyarsh, evseev, glebfm, kernelbot, ldv, mike, placeholder, rider, sbolshakov, shrek, sin, vitty, vsu, vt, zerg
Version: unstable   
Hardware: all   
OS: Linux   
Attachments:
Description Flags
fixed -owl-tmp.patch none

Description Peter 'Nidd' Novodvorsky 2007-07-17 11:59:04 MSD
bcc uses TMPDIR var in a following way:
tmpdir=_secure_getenv("TMPDIR");
sprintf(buf, "blah$%05d$$@#!@#!@#", some_secure_info);
p = catstr(tmpdir, buf);

then it uses p as a path to tmp file. However, in my ALT installation it
appeared that TMPDIR was equal to /tmp/.private/nidd (notice the absence of / in
the end of the path). This way, bcc tried to create and unlink files like
/tmp/.private/niddblah$$12312$#%#$% and of course it got permission denied error. 

Attached patch while it does not look very good fixes the problem.

This happens on every run of bcc which makes is unusable on default installation.
Steps to Reproduce:
compile something with bcc in default ALT environment.
Comment 1 Peter 'Nidd' Novodvorsky 2007-07-17 12:00:32 MSD
Created attachment 2103 [details]
fixed -owl-tmp.patch
Comment 2 Dmitry V. Levin 2007-07-17 12:31:54 MSD
Thanks, I'll take care.
Comment 3 Dmitry V. Levin 2007-07-17 17:03:43 MSD
Applied in 0.16.17-alt5.