Index: modules/profile/profile.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.admin.inc,v
retrieving revision 1.10
diff -u -p -r1.10 profile.admin.inc
--- modules/profile/profile.admin.inc	14 Apr 2008 17:48:41 -0000	1.10
+++ modules/profile/profile.admin.inc	8 Jul 2008 12:26:21 -0000
@@ -245,7 +245,13 @@ Unless you know what you are doing, it i
   $form['fields']['visibility'] = array('#type' => 'radios',
     '#title' => t('Visibility'),
     '#default_value' => isset($edit['visibility']) ? $edit['visibility'] : PROFILE_PUBLIC,
-    '#options' => array(PROFILE_HIDDEN => t('Hidden profile field, only accessible by administrators, modules and themes.'), PROFILE_PRIVATE => t('Private field, content only available to privileged users.'), PROFILE_PUBLIC => t('Public field, content shown on profile page but not used on member list pages.'), PROFILE_PUBLIC_LISTINGS => t('Public field, content shown on profile page and on member list pages.')),
+    '#options' => array(
+      PROFILE_HIDDEN => t('Hidden profile field, only accessible by administrators, modules and themes.'),
+      PROFILE_PRIVATE => t('Private field, content only available to privileged users.'),
+      PROFILE_PRIVATE_MASK => t('Masqueraded private field, content only available to privileged users and shown as *********.'),
+      PROFILE_PUBLIC => t('Public field, content shown on profile page but not used on member list pages.'),
+      PROFILE_PUBLIC_LISTINGS => t('Public field, content shown on profile page and on member list pages.')
+    ),
   );
   if ($type == 'selection' || $type == 'list' || $type == 'textfield') {
     $form['fields']['page'] = array('#type' => 'textfield',
Index: modules/profile/profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.241
diff -u -p -r1.241 profile.module
--- modules/profile/profile.module	6 May 2008 12:18:49 -0000	1.241
+++ modules/profile/profile.module	8 Jul 2008 12:26:21 -0000
@@ -27,6 +27,11 @@ define('PROFILE_PUBLIC_LISTINGS', 3);
 define('PROFILE_HIDDEN', 4);
 
 /**
+ * Masqueraded private field, content only available to privileged users and shown as *********.
+ */
+define('PROFILE_PRIVATE_MASK', 5);
+
+/**
  * Implementation of hook_help().
  */
 function profile_help($path, $arg) {
@@ -253,6 +258,8 @@ function profile_view_field($user, $fiel
     switch ($field->type) {
       case 'textarea':
         return check_markup($value);
+      case 'password':
+        $value = '**********';
       case 'textfield':
       case 'selection':
         return $browse ? l($value, 'profile/' . $field->name . '/' . $value) : check_plain($value);
@@ -361,6 +368,16 @@ function profile_form_profile($edit, $us
           $fields[$category][$field->name]['#autocomplete_path'] = "profile/autocomplete/" . $field->fid;
         }
         break;
+      case 'password':
+        $fields[$category][$field->name] = array(
+          '#type' => 'password',
+          '#title' => check_plain($field->title),
+          '#default_value' => isset($edit[$field->name]) ? $edit[$field->name] : '',
+          '#maxlength' => 255,
+          '#description' => _profile_form_explanation($field),
+          '#required' => $field->required,
+        );
+        break;
       case 'textarea':
         $fields[$category][$field->name] = array('#type' => 'textarea',
           '#title' => check_plain($field->title),
@@ -536,13 +553,16 @@ function template_preprocess_profile_wra
 }
 
 function _profile_field_types($type = NULL) {
-  $types = array('textfield' => t('single-line textfield'),
-                 'textarea' => t('multi-line textfield'),
-                 'checkbox' => t('checkbox'),
-                 'selection' => t('list selection'),
-                 'list' => t('freeform list'),
-                 'url' => t('URL'),
-                 'date' => t('date'));
+  $types = array(
+    'textfield' => t('single-line textfield'),
+    'textarea' => t('multi-line textfield'),
+    'checkbox' => t('checkbox'),
+    'selection' => t('list selection'),
+    'list' => t('freeform list'),
+    'url' => t('URL'),
+    'date' => t('date'),
+    'password' => t('password'),
+  );
   return isset($type) ? $types[$type] : $types;
 }
 
Index: modules/profile/profile.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.pages.inc,v
retrieving revision 1.2
diff -u -p -r1.2 profile.pages.inc
--- modules/profile/profile.pages.inc	8 Dec 2007 14:06:22 -0000	1.2
+++ modules/profile/profile.pages.inc	8 Jul 2008 12:26:21 -0000
@@ -22,7 +22,7 @@ function profile_browse() {
       return;
     }
     // Do not allow browsing of private and hidden fields by non-admins.
-    if (!user_access('administer users') && ($field->visibility == PROFILE_PRIVATE || $field->visibility == PROFILE_HIDDEN)) {
+    if (!user_access('administer users') && ($field->visibility == PROFILE_PRIVATE || $field->visibility == PROFILE_PRIVATE_MASK || $field->visibility == PROFILE_HIDDEN)) {
       drupal_access_denied();
       return;
     }
