Bug 12355 - bcc doesn't work because of incorrect $TMPDIR usage
Summary: bcc doesn't work because of incorrect $TMPDIR usage
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: dev86 (show other bugs)
Version: unstable
Hardware: all Linux
: P4 major
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-17 11:59 MSD by Peter 'Nidd' Novodvorsky
Modified: 2007-07-17 17:03 MSD (History)
15 users (show)

See Also:


Attachments
fixed -owl-tmp.patch (1.70 KB, patch)
2007-07-17 12:00 MSD, Peter 'Nidd' Novodvorsky
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.