From 9eca46d0cc71e66c148dee6c8b2a1744af219553 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 13 Aug 2009 21:39:43 +1000 Subject: [PATCH] Fixed display of Windows AD binary attributes --- lib/PageRender.php | 3 +++ lib/ds_ldap.php | 1 + lib/functions.php | 2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/PageRender.php b/lib/PageRender.php index d923f4b..f858216 100644 --- a/lib/PageRender.php +++ b/lib/PageRender.php @@ -606,6 +606,9 @@ class PageRender extends Visitor { final protected function drawCurrentValueBinaryAttribute($attribute,$i) { printf('[%s]',_('Binary Value')); + + if (in_array($attribute->getName(),array('objectsid'))) + printf(' (%s)', binSIDtoText($attribute->getValue(0))); } protected function drawFormReadOnlyValueBinaryAttribute($attribute,$i) { diff --git a/lib/ds_ldap.php b/lib/ds_ldap.php index 4ea31d8..ff3d3dc 100644 --- a/lib/ds_ldap.php +++ b/lib/ds_ldap.php @@ -2112,6 +2112,7 @@ class ldap extends DS { strcasecmp($attr_name,'networkaddress') == 0 || strcasecmp($attr_name,'objectGUID') == 0 || strcasecmp($attr_name,'objectSID') == 0 || + strcasecmp($attr_name,'auditingPolicy') == 0 || strcasecmp($attr_name,'jpegPhoto') == 0 || $syntax == '1.3.6.1.4.1.1466.115.121.1.10' || $syntax == '1.3.6.1.4.1.1466.115.121.1.28' || diff --git a/lib/functions.php b/lib/functions.php index b4c8860..3e98174 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1979,8 +1979,6 @@ function ldap_error_msg($msg,$errnum) { * fixed_width, fixed_height, img_opts. */ function draw_jpeg_photo($server,$dn,$attr_name='jpegphoto',$index,$draw_delete_buttons=false,$options=array()) { - global $app; - if (DEBUG_ENABLED) debug_log('Entered with (%s,%s,%s,%s,%s,%s)',1,__FILE__,__LINE__,__METHOD__, is_object($server),$dn,$attr_name,$index,$draw_delete_buttons,$img_html_attrs);