luis4god / darkice

Automatically exported from code.google.com/p/darkice
0 stars 0 forks source link

darkice 1.1 doesn't create files with permissions for group/others #74

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add localDumpFile to darkice.cfg
2. Check permissions of localDumpFile

What is the expected output? What do you see instead?

darkice should be creating files with permission bits for user/group/others, 
while honoring umask. Instead it produces files with only the permission bits 
for the user set.

What version of the product are you using? On what operating system?

darkice 1.1 on Debian wheezy

Please provide any additional information below.

FileSink::create is creating files with only the user permission bits set. 
Using "S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH" as the mode 
for creat() there fixes that, while still honoring the processes file mode 
creation mask (umask).

root's umask is usually 0022. Running darkice without setting an explicit 
different umask therefore yields file with these permissions:

  -rw-r--r-- 1 root root   444162 Aug 25 08:44 darkice.mp3

Setting another umask (like 0066) before running darkice would still yield 
files without permission for group/other.

Original issue reported on code.google.com by m...@sprachgewalt.de on 25 Aug 2012 at 6:47