Description of problem: The ipc_perm parameter in dmix.template and dsnoop_template has no effect, because ainit always uses 0600 as permission. Version-Release number of selected component (if applicable): alsa-utils-1.0.11-4.rc2 How reproducible: 100% Steps to Reproduce: 1. Modify /etc/alsa/dmix.template, changing for example ipc_perm 0600 into ipc_perm 0666 2. ainit <name_of_the_user> start 3. ipcs -a Actual results: The shared memory segments and the semaphore arrays have been created with permission 0600 and not 0666. Expected results: Permission should be respected. Additional info: I want to mix audio from many users, so I tried to set ipc_perm to 0666 in /etc/alsa/dmix.template and /etc/alsa/dsnoop.template (in addition to 0666 permission on the devices). This doesn't work well, because when ainit creates /etc/alsa/dmix.conf and /etc/alsa/dsnoop.conf it allocates ipc_key and ipc_semaphore using an hardcoded permission of 0600. The generated *.conf files do contain the "ipc_perm 0666" line, but the keys and the semaphore have already been incorrectly created. The problem is here (hardcoded 0600): /* Checking if IPC key/semaphore already exist */ int check_ipc_key(key_t key) { int shm_id = shmget(key, 1, IPC_CREAT | IPC_EXCL | 0600); return (shm_id >= 0); } int check_ipc_semaphore(key_t key) { int shm_id = semget(key, 1, IPC_CREAT | IPC_EXCL | 0600); return (shm_id >= 0); }
fixed in rawhide, I removed all ainit stuffs, they're not needed any more in the latest upstream.