1999-09-10 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gnome-file-property-dialog.c (apply_uid_group_change): Fix more broken code.
Этот коммит содержится в:
родитель
4469b3d705
Коммит
0f59a02894
@ -1,3 +1,8 @@
|
|||||||
|
1999-09-10 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gnome-file-property-dialog.c (apply_uid_group_change): Fix more
|
||||||
|
broken code.
|
||||||
|
|
||||||
1999-09-09 Federico Mena Quintero <federico@redhat.com>
|
1999-09-09 Federico Mena Quintero <federico@redhat.com>
|
||||||
|
|
||||||
* gcorba.c (WindowFactory_close_invalid_windows): Doh. Walk the
|
* gcorba.c (WindowFactory_close_invalid_windows): Doh. Walk the
|
||||||
|
@ -812,7 +812,7 @@ perm_owner_new (GnomeFilePropertyDialog *fp_dlg)
|
|||||||
} else {
|
} else {
|
||||||
char buf[100];
|
char buf[100];
|
||||||
|
|
||||||
g_snprintf (buf, sizeof (buf), _("<Unknown> (%d)"), (int) fp_dlg->st.st_uid);
|
g_snprintf (buf, sizeof (buf), "%d", (int) fp_dlg->st.st_uid);
|
||||||
gtk_entry_set_text (GTK_ENTRY (gentry), buf);
|
gtk_entry_set_text (GTK_ENTRY (gentry), buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1136,7 +1136,8 @@ apply_uid_group_change (GnomeFilePropertyDialog *fpd)
|
|||||||
/* we only check if our euid == 0 */
|
/* we only check if our euid == 0 */
|
||||||
if (fpd->euid == 0) {
|
if (fpd->euid == 0) {
|
||||||
new_user_name = gtk_entry_get_text (GTK_ENTRY (fpd->owner_entry));
|
new_user_name = gtk_entry_get_text (GTK_ENTRY (fpd->owner_entry));
|
||||||
if (new_user_name && strcmp (fpd->user_name, new_user_name)) {
|
|
||||||
|
if (fpd->user_name && new_user_name && strcmp (fpd->user_name, new_user_name)) {
|
||||||
/* now we need to get the new uid */
|
/* now we need to get the new uid */
|
||||||
p = getpwnam (new_user_name);
|
p = getpwnam (new_user_name);
|
||||||
if (!p) {
|
if (!p) {
|
||||||
@ -1147,8 +1148,19 @@ apply_uid_group_change (GnomeFilePropertyDialog *fpd)
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
uid = p->pw_uid;
|
uid = p->pw_uid;
|
||||||
|
} else {
|
||||||
|
if (new_user_name){
|
||||||
|
p = getpwnam (new_user_name);
|
||||||
|
if (!p) {
|
||||||
|
uid = atoi (new_user_name);
|
||||||
|
if (uid == 0) {
|
||||||
|
message (1, "Error", _("You entered an invalid username"));
|
||||||
|
uid = fpd->st.st_uid;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
uid = p->pw_uid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now we check the group */
|
/* now we check the group */
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user