# HG changeset patch # User Matt Keenan # Date 1257466388 0 # Node ID e84402006fa506cbb55c71715850c34a87724f79 # Parent e631367ff83dcddcd290fe3da44c24a316219877 1436 Installation does not need to ask Root Password diff -r e631367ff83d -r e84402006fa5 usr/src/cmd/gui-install/src/callbacks.c --- a/usr/src/cmd/gui-install/src/callbacks.c Wed Nov 04 10:10:51 2009 -0700 +++ b/usr/src/cmd/gui-install/src/callbacks.c Fri Nov 06 00:13:08 2009 +0000 @@ -401,7 +401,7 @@ gtk_widget_hide(MainWindow.screentitlesublabel2); gtk_label_set_label(GTK_LABEL(MainWindow.userlabel), MainWindow.ActiveStageTitles[USER_SCREEN]); - gtk_widget_grab_focus(MainWindow.UsersWindow.rootpassword1entry); + gtk_widget_grab_focus(MainWindow.UsersWindow.usernameentry); help_dialog_refresh(InstallCurrScreen); break; @@ -746,7 +746,7 @@ gtk_widget_hide(MainWindow.screentitlesublabel2); gtk_label_set_label(GTK_LABEL(MainWindow.userlabel), MainWindow.ActiveStageTitles[USER_SCREEN]); - gtk_widget_grab_focus(MainWindow.UsersWindow.rootpassword1entry); + gtk_widget_grab_focus(MainWindow.UsersWindow.usernameentry); help_dialog_refresh(InstallCurrScreen); break; } @@ -859,23 +859,6 @@ } gboolean -on_rootpassword_focus_out_event(GtkWidget *widget, - GdkEventFocus *event, - gpointer user_data) -{ - if (users_validate_root_passwords(widget, FALSE)) { - /* Clear the info/warning labels */ - if (MainWindow.UsersWindow.error_posted == TRUE) { - MainWindow.UsersWindow.error_posted = FALSE; - } else { - users_clear_info_warning_labels(); - users_entry_unselect_text(widget); - } - } - return (FALSE); -} - -gboolean on_loginname_focus_out_event(GtkWidget *widget, GdkEventFocus *event, gpointer user_data) diff -r e631367ff83d -r e84402006fa5 usr/src/cmd/gui-install/src/callbacks.h --- a/usr/src/cmd/gui-install/src/callbacks.h Wed Nov 04 10:10:51 2009 -0700 +++ b/usr/src/cmd/gui-install/src/callbacks.h Fri Nov 06 00:13:08 2009 +0000 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -63,10 +63,6 @@ void on_users_entry_changed(GtkEditable *editable, gpointer user_data); -gboolean on_rootpassword_focus_out_event(GtkWidget *widget, - GdkEventFocus *event, - gpointer user_data); - gboolean on_userpassword_focus_out_event(GtkWidget *widget, GdkEventFocus *event, gpointer user_data); diff -r e631367ff83d -r e84402006fa5 usr/src/cmd/gui-install/src/confirmation-screen.c --- a/usr/src/cmd/gui-install/src/confirmation-screen.c Wed Nov 04 10:10:51 2009 -0700 +++ b/usr/src/cmd/gui-install/src/confirmation-screen.c Fri Nov 06 00:13:08 2009 +0000 @@ -459,14 +459,6 @@ gtk_widget_show( MainWindow.ConfirmationWindow.accountvbox); - if (!InstallationProfile.rootpassword) { - add_detail_hbox( - MainWindow.ConfirmationWindow.accountvbox, - TRUE, FALSE, - _("Root Account:"), - _("A Root password is not defined. The system is unsecured.")); - } - if (!InstallationProfile.loginname) { add_detail_hbox( MainWindow.ConfirmationWindow.accountvbox, @@ -486,6 +478,12 @@ g_free(tmpStr); } + add_detail_hbox( + MainWindow.ConfirmationWindow.accountvbox, + FALSE, FALSE, + _("Root Password: Same as user account."), + NULL); + if (InstallationProfile.hostname) { tmpStr = g_strdup_printf( diff -r e631367ff83d -r e84402006fa5 usr/src/cmd/gui-install/src/installation-profile.h --- a/usr/src/cmd/gui-install/src/installation-profile.h Wed Nov 04 10:10:51 2009 -0700 +++ b/usr/src/cmd/gui-install/src/installation-profile.h Fri Nov 06 00:13:08 2009 +0000 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -65,7 +65,6 @@ GList *locales; locale_info_t *def_locale; - gchar *rootpassword; gchar *username; gchar *loginname; gchar *userpassword; diff -r e631367ff83d -r e84402006fa5 usr/src/cmd/gui-install/src/installation-screen.c --- a/usr/src/cmd/gui-install/src/installation-screen.c Wed Nov 04 10:10:51 2009 -0700 +++ b/usr/src/cmd/gui-install/src/installation-screen.c Fri Nov 06 00:13:08 2009 +0000 @@ -821,13 +821,13 @@ } /* 3 : OM_ATTR_ROOT_PASSWORD */ - if (InstallationProfile.rootpassword) { + if (InstallationProfile.userpassword) { if ((err = nvlist_add_string( install_choices, OM_ATTR_ROOT_PASSWORD, g_strdup( om_encrypt_passwd( - (char *)InstallationProfile.rootpassword, + (char *)InstallationProfile.userpassword, "root")))) != 0) { g_warning( _("Failed to add %s to pair list"), diff -r e631367ff83d -r e84402006fa5 usr/src/cmd/gui-install/src/users-screen.c --- a/usr/src/cmd/gui-install/src/users-screen.c Wed Nov 04 10:10:51 2009 -0700 +++ b/usr/src/cmd/gui-install/src/users-screen.c Fri Nov 06 00:13:08 2009 +0000 @@ -121,19 +121,14 @@ glade_xml_signal_autoconnect(MainWindow.userswindowxml); MainWindow.UsersWindow.userstoplevel = NULL; - MainWindow.UsersWindow.rootpassword1entry = NULL; - MainWindow.UsersWindow.rootpassword2entry = NULL; - MainWindow.UsersWindow.rootpasswordinfo= NULL; - MainWindow.UsersWindow.rootpasswordinfoimage = NULL; - MainWindow.UsersWindow.rootpasswordinfolabel = NULL; MainWindow.UsersWindow.usernameentry = NULL; MainWindow.UsersWindow.loginnameentry = NULL; - MainWindow.UsersWindow.loginnameinfo= NULL; + MainWindow.UsersWindow.loginnameinfo = NULL; MainWindow.UsersWindow.loginnameinfoimage = NULL; MainWindow.UsersWindow.loginnameinfolabel = NULL; MainWindow.UsersWindow.userpassword1entry = NULL; MainWindow.UsersWindow.userpassword2entry = NULL; - MainWindow.UsersWindow.userpasswordinfo= NULL; + MainWindow.UsersWindow.userpasswordinfo = NULL; MainWindow.UsersWindow.userpasswordinfoimage = NULL; MainWindow.UsersWindow.userpasswordinfolabel = NULL; MainWindow.UsersWindow.hostnameentry = NULL; @@ -143,7 +138,6 @@ MainWindow.UsersWindow.error_posted = FALSE; - InstallationProfile.rootpassword = NULL; InstallationProfile.username = NULL; InstallationProfile.loginname = NULL; InstallationProfile.userpassword = NULL; @@ -189,8 +183,6 @@ users_load_widgets(void) { GtkSizeGroup *sizegroup = NULL; - GtkWidget *rootpassword1label; - GtkWidget *rootpassword2label; GtkWidget *userpassword1label; GtkWidget *userpassword2label; GtkWidget *usernamelabel; @@ -200,28 +192,13 @@ MainWindow.UsersWindow.userstoplevel = glade_xml_get_widget( MainWindow.userswindowxml, "userstoplevel"); - MainWindow.UsersWindow.rootpassword1entry = glade_xml_get_widget( - MainWindow.userswindowxml, - "rootpassword1entry"); - MainWindow.UsersWindow.rootpassword2entry = glade_xml_get_widget( - MainWindow.userswindowxml, - "rootpassword2entry"); - MainWindow.UsersWindow.rootpasswordinfo= glade_xml_get_widget( - MainWindow.userswindowxml, - "rootpasswordinfohbox"); - MainWindow.UsersWindow.rootpasswordinfoimage = glade_xml_get_widget( - MainWindow.userswindowxml, - "rootpasswordinfoimage"); - MainWindow.UsersWindow.rootpasswordinfolabel = glade_xml_get_widget( - MainWindow.userswindowxml, - "rootpasswordinfolabel"); MainWindow.UsersWindow.usernameentry = glade_xml_get_widget( MainWindow.userswindowxml, "usernameentry"); MainWindow.UsersWindow.loginnameentry = glade_xml_get_widget( MainWindow.userswindowxml, "loginnameentry"); - MainWindow.UsersWindow.loginnameinfo= glade_xml_get_widget( + MainWindow.UsersWindow.loginnameinfo = glade_xml_get_widget( MainWindow.userswindowxml, "loginnameinfohbox"); MainWindow.UsersWindow.loginnameinfoimage = glade_xml_get_widget( @@ -259,10 +236,6 @@ "hostnameinfolabel"); - rootpassword1label = glade_xml_get_widget(MainWindow.userswindowxml, - "rootpassword1label"); - rootpassword2label = glade_xml_get_widget(MainWindow.userswindowxml, - "rootpassword2label"); userpassword1label = glade_xml_get_widget(MainWindow.userswindowxml, "userpassword1label"); userpassword2label = glade_xml_get_widget(MainWindow.userswindowxml, @@ -275,8 +248,6 @@ "hostnamelabel"); sizegroup = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); - gtk_size_group_add_widget(sizegroup, rootpassword1label); - gtk_size_group_add_widget(sizegroup, rootpassword2label); gtk_size_group_add_widget(sizegroup, usernamelabel); gtk_size_group_add_widget(sizegroup, loginnamelabel); gtk_size_group_add_widget(sizegroup, userpassword1label); @@ -291,14 +262,6 @@ "key-press-event", G_CALLBACK(users_password_key_press), NULL); - g_signal_connect(G_OBJECT(MainWindow.UsersWindow.rootpassword1entry), - "key-press-event", - G_CALLBACK(users_password_key_press), - NULL); - g_signal_connect(G_OBJECT(MainWindow.UsersWindow.rootpassword2entry), - "key-press-event", - G_CALLBACK(users_password_key_press), - NULL); g_signal_connect(G_OBJECT(MainWindow.UsersWindow.userpassword1entry), "button-press-event", @@ -308,14 +271,6 @@ "button-press-event", G_CALLBACK(users_password_button_press), NULL); - g_signal_connect(G_OBJECT(MainWindow.UsersWindow.rootpassword1entry), - "button-press-event", - G_CALLBACK(users_password_button_press), - NULL); - g_signal_connect(G_OBJECT(MainWindow.UsersWindow.rootpassword2entry), - "button-press-event", - G_CALLBACK(users_password_button_press), - NULL); } gboolean @@ -344,7 +299,10 @@ g_assert(pwbuflen >= 0); } - if ((check_changed && loginname_changed) || (!check_changed)) { + if (!user_account_entered()) { + errormsg = g_strdup(_("Log-in must be entered.")); + ret_val = FALSE; + } else if ((check_changed && loginname_changed) || (!check_changed)) { loginname = gtk_entry_get_text( GTK_ENTRY(MainWindow.UsersWindow.loginnameentry)); @@ -414,6 +372,8 @@ gtk_label_set_label( GTK_LABEL(MainWindow.UsersWindow.loginnameinfolabel), errormsg); + users_entry_select_text( + MainWindow.UsersWindow.loginnameentry); MainWindow.UsersWindow.error_posted = TRUE; g_free(errormsg); } @@ -440,7 +400,11 @@ "changed")); } - if ((check_changed && (pwd1_changed || pwd2_changed)) || + if (!user_password_entered()) { + errormsg = g_strdup_printf(_(PasswordErrorMarkup), + _("User password must be entered.")); + ret_val = FALSE; + } else if ((check_changed && (pwd1_changed || pwd2_changed)) || (!check_changed)) { /* Get Text */ @@ -494,87 +458,8 @@ GTK_LABEL(MainWindow.UsersWindow.userpasswordinfolabel), errormsg); g_free(errormsg); - MainWindow.UsersWindow.error_posted = TRUE; - } - return (ret_val); -} - -gboolean -users_validate_root_passwords(GtkWidget *widget, gboolean check_changed) -{ - gboolean pwd1_changed = FALSE; - gboolean pwd2_changed = FALSE; - gboolean ret_val = TRUE; - gchar *pwd1, *pwd2; - gchar *errormsg = NULL; - - if (check_changed) { - pwd1_changed = GPOINTER_TO_INT( - g_object_get_data( - G_OBJECT(MainWindow.UsersWindow.rootpassword1entry), - "changed")); - pwd2_changed = GPOINTER_TO_INT( - g_object_get_data( - G_OBJECT(MainWindow.UsersWindow.rootpassword2entry), - "changed")); - } - - if ((check_changed && (pwd1_changed || pwd2_changed)) || - (!check_changed)) { - - /* Get Text */ - pwd1 = (gchar *) gtk_entry_get_text( - GTK_ENTRY(MainWindow.UsersWindow.rootpassword1entry)); - pwd2 = (gchar *) gtk_entry_get_text( - GTK_ENTRY(MainWindow.UsersWindow.rootpassword2entry)); - - if (widget == MainWindow.UsersWindow.rootpassword1entry) { - /* Only check validty of password */ - if (!is_password_valid(pwd1, &errormsg)) { - ret_val = FALSE; - } - } else { - if (pwd1 || pwd2) { - if (!is_password_valid(pwd1, &errormsg)) { - ret_val = FALSE; - } else if (!is_password_valid(pwd2, &errormsg)) { - ret_val = FALSE; - } else if (!is_password_equal(pwd1, pwd2)) { - errormsg = g_strdup_printf(_(PasswordErrorMarkup), - _("Passwords do not match.")); - ret_val = FALSE; - } - } - } - - /* Unset "changed" */ - if (check_changed) { - g_object_set_data( - G_OBJECT(MainWindow.UsersWindow.rootpassword1entry), - "changed", - GINT_TO_POINTER(FALSE)); - g_object_set_data( - G_OBJECT(MainWindow.UsersWindow.rootpassword2entry), - "changed", - GINT_TO_POINTER(FALSE)); - } - } - - if (!ret_val) { - /* Display Warning, reset passwords and possibly set focus */ - gtk_entry_set_text( - GTK_ENTRY(MainWindow.UsersWindow.rootpassword1entry), - ""); - gtk_entry_set_text( - GTK_ENTRY(MainWindow.UsersWindow.rootpassword2entry), - ""); - gtk_widget_grab_focus( - MainWindow.UsersWindow.rootpassword1entry); - gtk_widget_show(MainWindow.UsersWindow.rootpasswordinfoimage); - gtk_label_set_label( - GTK_LABEL(MainWindow.UsersWindow.rootpasswordinfolabel), - errormsg); - g_free(errormsg); + users_entry_select_text( + MainWindow.UsersWindow.userpassword1entry); MainWindow.UsersWindow.error_posted = TRUE; } return (ret_val); @@ -583,25 +468,22 @@ gboolean user_account_entered(void) { - /* User account only needs login name so just Check the login name field */ + /* Check if login name entered */ return (!is_str_empty((gchar *) gtk_entry_get_text( - GTK_ENTRY(MainWindow.UsersWindow.loginnameentry)))); + GTK_ENTRY(MainWindow.UsersWindow.loginnameentry)))); } gboolean -root_password_entered(void) +user_password_entered(void) { /* If one password entered then both must have been entered */ return (!is_str_empty((gchar *) gtk_entry_get_text( - GTK_ENTRY(MainWindow.UsersWindow.rootpassword1entry)))); + GTK_ENTRY(MainWindow.UsersWindow.userpassword1entry)))); } gboolean users_validate(void) { - gboolean username_empty = FALSE; - gboolean user_pwd1_empty = FALSE; - gboolean user_pwd2_empty = FALSE; gboolean host_name_empty = FALSE; gboolean ret_val = TRUE; @@ -609,163 +491,100 @@ return (FALSE); } - if ((ret_val = users_validate_root_passwords( - MainWindow.UsersWindow.rootpassword2entry, - FALSE)) == FALSE) { + if (!user_account_entered()) { + gtk_widget_grab_focus( + MainWindow.UsersWindow.loginnameentry); + users_entry_select_text( + MainWindow.UsersWindow.loginnameentry); gui_install_prompt_dialog( - FALSE, - FALSE, - FALSE, - GTK_MESSAGE_ERROR, - _("Root Password Invalid"), - _("The two root passwords do not match\nRe-enter the root password.")); + FALSE, + FALSE, + FALSE, + GTK_MESSAGE_ERROR, + _("Invalid User Account"), + _("The Log-in name cannot be blank.\nEnter a Log-in name.")); + ret_val = FALSE; + return (ret_val); + } + + if (!user_password_entered()) { + gtk_widget_grab_focus( + MainWindow.UsersWindow.userpassword1entry); + users_entry_select_text( + MainWindow.UsersWindow.userpassword1entry); + gui_install_prompt_dialog( + FALSE, + FALSE, + FALSE, + GTK_MESSAGE_ERROR, + _("Invalid User Account"), + _("The user password cannot be blank.\nEnter a user password.")); + ret_val = FALSE; + return (ret_val); + } + + if ((ret_val = users_validate_login_name(FALSE)) == FALSE) { + /* No need to set focus, as done in validate function */ + gui_install_prompt_dialog( + FALSE, + FALSE, + FALSE, + GTK_MESSAGE_ERROR, + _("Invalid User Account"), + _("Invalid Log-in name.\nEnter a different Log-in name.")); return (ret_val); } if ((ret_val = users_validate_user_passwords( - MainWindow.UsersWindow.userpassword2entry, - FALSE)) == FALSE) { + MainWindow.UsersWindow.userpassword2entry, + FALSE)) == FALSE) { + /* No need to set focus, as done in validate function */ gui_install_prompt_dialog( - FALSE, - FALSE, - FALSE, - GTK_MESSAGE_ERROR, - _("User Password Invalid"), - _("The two user passwords do not match\nRe-enter the user password.")); - return (ret_val); - } - - if (user_account_entered()) { - if ((ret_val = users_validate_login_name(FALSE)) == FALSE) { - gui_install_prompt_dialog( - FALSE, - FALSE, - FALSE, - GTK_MESSAGE_ERROR, - _("Invalid User Account"), - _("Invalid Log-in name.\nEnter a different Log-in name.")); - return (ret_val); - } - } - - username_empty = is_str_empty((gchar *) gtk_entry_get_text( - GTK_ENTRY(MainWindow.UsersWindow.usernameentry))); - user_pwd1_empty = is_str_empty((gchar *) gtk_entry_get_text( - GTK_ENTRY(MainWindow.UsersWindow.userpassword1entry))); - user_pwd2_empty = is_str_empty((gchar *) gtk_entry_get_text( - GTK_ENTRY(MainWindow.UsersWindow.userpassword2entry))); - - if ((!username_empty || - !user_pwd1_empty || - !user_pwd2_empty) && - !user_account_entered()) { - ret_val = FALSE; - - if (!username_empty) { - gtk_widget_grab_focus( - MainWindow.UsersWindow.usernameentry); - users_entry_select_text( - MainWindow.UsersWindow.usernameentry); - } else { - gtk_widget_grab_focus( - MainWindow.UsersWindow.loginnameentry); - users_entry_select_text( - MainWindow.UsersWindow.loginnameentry); - } - gui_install_prompt_dialog( - FALSE, - FALSE, - FALSE, - GTK_MESSAGE_ERROR, - _("Invalid User Account"), - _("The Log-in name cannot be blank.\nEnter a Log-in name or clear all user account fields.")); + FALSE, + FALSE, + FALSE, + GTK_MESSAGE_ERROR, + _("User Password Invalid"), + _("The two user passwords do not match\nRe-enter the user password.")); return (ret_val); } host_name_empty = is_str_empty((gchar *) gtk_entry_get_text( - GTK_ENTRY(MainWindow.UsersWindow.hostnameentry))); + GTK_ENTRY(MainWindow.UsersWindow.hostnameentry))); if (!host_name_empty) { if ((ret_val = users_validate_host_name(FALSE)) == FALSE) { gui_install_prompt_dialog( - FALSE, - FALSE, - FALSE, - GTK_MESSAGE_ERROR, - _("Invalid Computer Name"), - _("The computer name contains invalid characters.\nEnter a valid computer name.")); + FALSE, + FALSE, + FALSE, + GTK_MESSAGE_ERROR, + _("Invalid Computer Name"), + _("The computer name contains invalid characters.\nEnter a valid computer name.")); return (ret_val); } } - if (!root_password_entered()) { - ret_val = - gui_install_prompt_dialog( - TRUE, - TRUE, - FALSE, - GTK_MESSAGE_WARNING, - _("No root password"), - _("A root password has not been defined. The system is completely unsecured.\nClick Cancel to set a root password.")); - if (!ret_val) { - users_clear_info_warning_labels(); - users_entry_unselect_text( - MainWindow.UsersWindow.hostnameentry); - gtk_widget_grab_focus( - MainWindow.UsersWindow.rootpassword1entry); - users_entry_select_text( - MainWindow.UsersWindow.rootpassword1entry); - return (ret_val); - } - } - if (host_name_empty) { gtk_entry_set_text( - GTK_ENTRY(MainWindow.UsersWindow.hostnameentry), - "solaris-devx"); - ret_val = - gui_install_prompt_dialog( - TRUE, - TRUE, - FALSE, - GTK_MESSAGE_WARNING, - _("Invalid Computer Name"), - _("The computer name cannot be blank. It has been reset to the default value.\nClick Cancel to set a different computer name.")); + GTK_ENTRY(MainWindow.UsersWindow.hostnameentry), + "opensolaris"); + ret_val = gui_install_prompt_dialog( + TRUE, + TRUE, + FALSE, + GTK_MESSAGE_WARNING, + _("Invalid Computer Name"), + _("The computer name cannot be blank. It has been reset to the default value.\nClick Cancel to set a different computer name.")); if (!ret_val) { gtk_widget_grab_focus( - MainWindow.UsersWindow.hostnameentry); + MainWindow.UsersWindow.hostnameentry); users_entry_select_text( - MainWindow.UsersWindow.hostnameentry); + MainWindow.UsersWindow.hostnameentry); return (ret_val); } } - if (ret_val) { - /* user has chosen to continue to summary screen */ - if (!user_account_entered()) { - /* Ensure other user account fields are blanked out */ - if (!user_account_entered) { - if (!username_empty) { - gtk_entry_set_text( - GTK_ENTRY(MainWindow.UsersWindow.usernameentry), - ""); - } - - if (!user_pwd1_empty) { - gtk_entry_set_text( - GTK_ENTRY(MainWindow.UsersWindow.userpassword1entry), - ""); - } - - if (!user_pwd2_empty) { - gtk_entry_set_text( - GTK_ENTRY(MainWindow.UsersWindow.userpassword2entry), - ""); - } - } - } - } - return (ret_val); } @@ -773,18 +592,11 @@ users_clear_info_warning_labels(void) { /* Blank out info labels if there is a message there */ - if (GTK_WIDGET_VISIBLE(MainWindow.UsersWindow.rootpasswordinfoimage)) { - gtk_widget_hide(MainWindow.UsersWindow.rootpasswordinfoimage); - gtk_label_set_label( - GTK_LABEL(MainWindow.UsersWindow.rootpasswordinfolabel), - _("Re-enter to check for typing errors.")); - } - if (GTK_WIDGET_VISIBLE(MainWindow.UsersWindow.loginnameinfoimage)) { gtk_widget_hide(MainWindow.UsersWindow.loginnameinfoimage); gtk_label_set_label( GTK_LABEL(MainWindow.UsersWindow.loginnameinfolabel), - _("Required when creating a user account.")); + _("")); } if (GTK_WIDGET_VISIBLE(MainWindow.UsersWindow.userpasswordinfoimage)) { @@ -809,11 +621,6 @@ const gchar *tmpStr; /* Reset All InstallationProfile User data to NULL */ - if (InstallationProfile.rootpassword != NULL) { - g_free(InstallationProfile.rootpassword); - InstallationProfile.rootpassword = NULL; - } - if (InstallationProfile.username != NULL) { g_free(InstallationProfile.username); InstallationProfile.username = NULL; @@ -834,12 +641,6 @@ InstallationProfile.hostname = NULL; } - if (root_password_entered()) { - InstallationProfile.rootpassword = - g_strdup((gchar *) gtk_entry_get_text( - GTK_ENTRY(MainWindow.UsersWindow.rootpassword1entry))); - } - if (user_account_entered()) { tmpStr = gtk_entry_get_text( GTK_ENTRY(MainWindow.UsersWindow.usernameentry)); diff -r e631367ff83d -r e84402006fa5 usr/src/cmd/gui-install/src/users-screen.h --- a/usr/src/cmd/gui-install/src/users-screen.h Wed Nov 04 10:10:51 2009 -0700 +++ b/usr/src/cmd/gui-install/src/users-screen.h Fri Nov 06 00:13:08 2009 +0000 @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,11 +39,6 @@ typedef struct _UsersWindowXML { GtkWidget *userstoplevel; - GtkWidget *rootpassword1entry; - GtkWidget *rootpassword2entry; - GtkWidget *rootpasswordinfo; - GtkWidget *rootpasswordinfoimage; - GtkWidget *rootpasswordinfolabel; GtkWidget *usernameentry; GtkWidget *loginnameentry; GtkWidget *loginnameinfo; @@ -70,9 +65,6 @@ void users_clear_info_warning_labels(void); -gboolean users_validate_root_passwords(GtkWidget *widget, - gboolean check_changed); - gboolean users_validate_login_name(gboolean check_changed); gboolean users_validate_user_passwords(GtkWidget *widget, @@ -82,7 +74,7 @@ gboolean user_account_entered(void); -gboolean root_password_entered(void); +gboolean user_password_entered(void); void users_store_data(void); diff -r e631367ff83d -r e84402006fa5 usr/src/cmd/gui-install/src/users.glade --- a/usr/src/cmd/gui-install/src/users.glade Wed Nov 04 10:10:51 2009 -0700 +++ b/usr/src/cmd/gui-install/src/users.glade Fri Nov 06 00:13:08 2009 +0000 @@ -25,11 +25,13 @@ --> + + True Users - GTK_WIN_POS_CENTER_ALWAYS - GDK_GRAVITY_CENTER + center-always + center @@ -37,160 +39,10 @@ 8 20 - - True - 0 - GTK_SHADOW_NONE - - - True - 10 - 12 - - - True - 2 - 3 - 6 - 10 - - - - - - True - True - False - True - 14 - - - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - - True - True - False - True - 14 - - - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - 10 - <span font_desc="Arial Bold">Con_firm password:</span> - True - True - rootpassword2entry - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - 0 - 10 - <span font_desc="Arial Bold">_Root password:</span> - True - True - rootpassword1entry - - - GTK_FILL - - - - - - True - 5 - - - 0 - gtk-no - 1 - - - False - False - - - - - True - 0 - Re-enter to check for typing errors. - True - True - - - False - False - 1 - - - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - - - - - True - 0 - 5 - <span font_desc="Arial Bold">Enter a root password for this system.</span> - True - - - label_item - - - - - False - False - - - True 0 - GTK_SHADOW_NONE + none True @@ -204,12 +56,6 @@ 6 10 - - - - - - True True @@ -355,18 +201,18 @@ 0 gtk-no - 1 + 1 False False + 0 True 0 - Required when creating a user account. True True @@ -394,11 +240,12 @@ 0 gtk-no - 1 + 1 False False + 0 @@ -425,6 +272,12 @@ + + + + + + @@ -434,7 +287,7 @@ True 0 5 - <span font_desc="Arial Bold">Create a user account for yourself.</span> + <span font_desc="Arial Bold">Create a user account for yourself. It will have administrative privileges.</span> True @@ -445,14 +298,14 @@ False False - 1 + 0 True 0 - GTK_SHADOW_NONE + none True @@ -504,11 +357,12 @@ 0 gtk-no - 1 + 1 False False + 0 @@ -550,7 +404,7 @@ False False - 2 + 1