mirror of
				https://github.com/prasathmani/tinyfilemanager.git
				synced 2025-10-31 10:25:49 +01:00 
			
		
		
		
	Check if posix_getpwuid/posix_getgrgid calls were successful (#1023)
This commit is contained in:
		| @@ -2051,6 +2051,12 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white | |||||||
|                 if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) { |                 if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) { | ||||||
|                     $owner = posix_getpwuid(fileowner($path . '/' . $f)); |                     $owner = posix_getpwuid(fileowner($path . '/' . $f)); | ||||||
|                     $group = posix_getgrgid(filegroup($path . '/' . $f)); |                     $group = posix_getgrgid(filegroup($path . '/' . $f)); | ||||||
|  |                     if ($owner === false) { | ||||||
|  |                         $owner = array('name' => '?'); | ||||||
|  |                     } | ||||||
|  |                     if ($group === false) { | ||||||
|  |                         $group = array('name' => '?'); | ||||||
|  |                     } | ||||||
|                 } else { |                 } else { | ||||||
|                     $owner = array('name' => '?'); |                     $owner = array('name' => '?'); | ||||||
|                     $group = array('name' => '?'); |                     $group = array('name' => '?'); | ||||||
| @@ -2104,6 +2110,12 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white | |||||||
|                 if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) { |                 if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) { | ||||||
|                     $owner = posix_getpwuid(fileowner($path . '/' . $f)); |                     $owner = posix_getpwuid(fileowner($path . '/' . $f)); | ||||||
|                     $group = posix_getgrgid(filegroup($path . '/' . $f)); |                     $group = posix_getgrgid(filegroup($path . '/' . $f)); | ||||||
|  |                     if ($owner === false) { | ||||||
|  |                         $owner = array('name' => '?'); | ||||||
|  |                     } | ||||||
|  |                     if ($group === false) { | ||||||
|  |                         $group = array('name' => '?'); | ||||||
|  |                     } | ||||||
|                 } else { |                 } else { | ||||||
|                     $owner = array('name' => '?'); |                     $owner = array('name' => '?'); | ||||||
|                     $group = array('name' => '?'); |                     $group = array('name' => '?'); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user