mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Add getpw to pledge, makes tmux work in YP environments, discovered by
matthieu, ok deraadt
This commit is contained in:
		
							
								
								
									
										4
									
								
								server.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								server.c
									
									
									
									
									
								
							@@ -175,8 +175,8 @@ server_start(struct event_base *base, int lockfd, char *lockfile)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if (debug_level > 3)
 | 
						if (debug_level > 3)
 | 
				
			||||||
		tty_create_log();
 | 
							tty_create_log();
 | 
				
			||||||
	if (pledge("stdio rpath wpath cpath fattr unix recvfd proc exec tty "
 | 
						if (pledge("stdio rpath wpath cpath fattr unix getpw recvfd proc exec "
 | 
				
			||||||
	    "ps", NULL) != 0)
 | 
						    "tty ps", NULL) != 0)
 | 
				
			||||||
		fatal("pledge failed");
 | 
							fatal("pledge failed");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	RB_INIT(&windows);
 | 
						RB_INIT(&windows);
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								tmux.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								tmux.c
									
									
									
									
									
								
							@@ -255,8 +255,8 @@ main(int argc, char **argv)
 | 
				
			|||||||
	if (shell_cmd != NULL && argc != 0)
 | 
						if (shell_cmd != NULL && argc != 0)
 | 
				
			||||||
		usage();
 | 
							usage();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (pledge("stdio rpath wpath cpath flock fattr unix sendfd recvfd "
 | 
						if (pledge("stdio rpath wpath cpath flock fattr unix getpw sendfd "
 | 
				
			||||||
	    "proc exec tty ps", NULL) != 0)
 | 
						    "recvfd proc exec tty ps", NULL) != 0)
 | 
				
			||||||
		err(1, "pledge");
 | 
							err(1, "pledge");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user