mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	add a few comments
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1110 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									a382492204
								
							
						
					
					
						commit
						703bb49c91
					
				
					 1 changed files with 9 additions and 1 deletions
				
			
		| 
						 | 
					@ -159,6 +159,10 @@ static int change_user(void) {
 | 
				
			||||||
    struct group * gr;
 | 
					    struct group * gr;
 | 
				
			||||||
    int r;
 | 
					    int r;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /* This function is called only in system-wide mode. It creates a
 | 
				
			||||||
 | 
					     * runtime dir in /var/run/ with proper UID/GID and drops privs
 | 
				
			||||||
 | 
					     * afterwards. */
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    if (!(pw = getpwnam(PA_SYSTEM_USER))) {
 | 
					    if (!(pw = getpwnam(PA_SYSTEM_USER))) {
 | 
				
			||||||
        pa_log(__FILE__": Failed to find user '%s'.", PA_SYSTEM_USER);
 | 
					        pa_log(__FILE__": Failed to find user '%s'.", PA_SYSTEM_USER);
 | 
				
			||||||
        return -1;
 | 
					        return -1;
 | 
				
			||||||
| 
						 | 
					@ -241,6 +245,10 @@ static int create_runtime_dir(void) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_runtime_path(NULL, fn, sizeof(fn));
 | 
					    pa_runtime_path(NULL, fn, sizeof(fn));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /* This function is called only when the daemon is started in
 | 
				
			||||||
 | 
					     * per-user mode. We create the runtime directory somewhere in
 | 
				
			||||||
 | 
					     * /tmp/ with the current UID/GID */
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    if (pa_make_secure_dir(fn, 0700, getuid(), getgid()) < 0) {
 | 
					    if (pa_make_secure_dir(fn, 0700, getuid(), getgid()) < 0) {
 | 
				
			||||||
        pa_log(__FILE__": Failed to create '%s': %s", fn, pa_cstrerror(errno));
 | 
					        pa_log(__FILE__": Failed to create '%s': %s", fn, pa_cstrerror(errno));
 | 
				
			||||||
        return -1;
 | 
					        return -1;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue