Re: start time

2005-01-31 Thread Miguel de Icaza
Hey,

> > > > I have applied this patch to the CVS repository with a few changes
> > > > (configure.in checks, plus made sure that the style matched the rest of
> > > > the code).
> 
> I think this patch is reasonable.
> 
> BTW, I did not add ChangeLog entries for these getgrouplist() patches.

This patch looks good, could you commit?

Miguel
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: Debian security advisory

2005-01-31 Thread Leonard den Ottolander
Hi Andrew,

On Mon, 2005-01-31 at 09:20, Andrew V. Samoilov wrote:
> > Yup. Andrew, could you please also post these patches for CAN
> > vulnerabilities here? That would come in handy :) .
> 
> Well, all of these are backports from our CVS.
> It seems it was noticed in the description.

Sure, I am aware of that. However posting these to the list can be very
useful for people involved with legacy systems, like myself for Fedora
Legacy. It wasn't that hard to extract the relevant patches from the
patch set, but still... :)

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research


___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: start time

2005-01-31 Thread Andrew V. Samoilov
Hello, Miguel, I am glad to see you here again.
> 
> > > I have applied this patch to the CVS repository with a few changes
> > > (configure.in checks, plus made sure that the style matched the rest of
> > > the code).

I think this patch is reasonable.

BTW, I did not add ChangeLog entries for these getgrouplist() patches.

-- 
Regards,
Andrew V. Samoilov


GET INTERNET ACCESS FROM BCS! http://www.bcs.zp.ua
Join BCS today! For your FREE webmail, visit: http://email.zp.ua/
src/ChangeLog:

* utilunix.c (init_groups): Use glib memory allocation functions.

--- utilunix.c~ Mon Jan 31 09:28:11 2005
+++ utilunix.c  Mon Jan 31 15:44:24 2005
@@ -94,33 +94,32 @@ void init_groups (void)
 
 #ifdef HAVE_GETGROUPLIST
 {
-gid_t *groups = NULL;
-int ng = 1;
-//struct group *grp;
-gid_t *newgroups = NULL;
-
-groups = (gid_t *) malloc(ng * sizeof(gid_t));
+   gid_t *groups = g_new (gid_t, 1);
+   int ng = 1;
+   gid_t *newgroups = NULL;
 
-if (getgrouplist(pwd->pw_name, pwd->pw_gid, groups, &ng) == -1) {
-newgroups = (gid_t *) malloc(ng * sizeof(gid_t));
-if (newgroups != NULL) {
-free (groups);
-groups = newgroups;
-getgrouplist (pwd->pw_name, pwd->pw_gid, groups, &ng);
-} else
-   ng = 1;
-}
+   if (getgrouplist (pwd->pw_name, pwd->pw_gid, groups, &ng) == -1) {
+   newgroups = g_new (gid_t, ng);
+   if (newgroups != NULL) {
+   g_free (groups);
+   groups = newgroups;
+   getgrouplist (pwd->pw_name, pwd->pw_gid, groups, &ng);
+   } else
+   ng = 1;
+   }
 
-for (i = 0; i < ng; i++) {
-grp = getgrgid(groups[i]);
-if (grp != NULL && !g_tree_lookup (current_user_gid, 
GUINT_TO_POINTER ((int) grp->gr_gid))) {
-g_tree_insert (current_user_gid,
-  GUINT_TO_POINTER ((int) grp->gr_gid),
-  g_strdup (grp->gr_name));
-}
-}
+   for (i = 0; i < ng; i++) {
+   grp = getgrgid (groups[i]);
+   if (grp != NULL
+   && !g_tree_lookup (current_user_gid,
+  GUINT_TO_POINTER ((int) grp->gr_gid))) {
+   g_tree_insert (current_user_gid,
+  GUINT_TO_POINTER ((int) grp->gr_gid),
+  g_strdup (grp->gr_name));
+   }
+   }
 
-   free(groups);
+   g_free (groups);
 }
 #else
 setgrent ();
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


More smbfs clean-ups

2005-01-31 Thread Andrew V. Samoilov
Hello, Pavel!

This patch comments some more unused samba code.

-- 
Regards,
Andrew V. Samoilov


GET INTERNET ACCESS FROM BCS! http://www.bcs.zp.ua
Join BCS today! For your FREE webmail, visit: http://email.zp.ua/
vfs/ChangeLog:

* samba/lib/username.c (map_username): Comment out.
(user_in_list): Ditto.

--- username.c~ Mon Aug 30 12:09:17 2004
+++ username.c  Mon Jan 31 18:26:00 2005
@@ -40,6 +40,7 @@ char *get_home_dir(char *user)
 }
 
 
+#if 0 /* Fix possible buffer overflow in sscanf(unixname,"%s",user) if 
uncomment */
 /***
 map a username from a dos name to a unix name by looking in the username
 map. Note that this modifies the name in place.
@@ -142,6 +143,7 @@ BOOL map_username(char *user)
 
   return mapped_user;
 }
+#endif /* 0 */
 
 /
 Get_Pwnam wrapper
@@ -226,6 +228,7 @@ struct passwd *Get_Pwnam(char *user,BOOL
   return(NULL);
 }
 
+#if 0
 /
 check if a user is in a netgroup user list
 /
@@ -366,6 +369,7 @@ BOOL user_in_list(char *user,char *list)
   }
   return(False);
 }
+#endif /* 0 */
 
 /* The functions below have been taken from password.c and slightly modified */
 /
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: Restoring the functionality of Alt-o

2005-01-31 Thread Miguel de Icaza
Hello,

> >Let me propose some possibilities:
> >
> >1) Revert Alt-o -> annoyed users because Alt-o suddenly changes.
> >
> >2) Create an alternate keyboard shortcut such as Alt-i that acts like
> >the old Alt-o.
> >
> >3) Keep Alt-o shortcut and switch between old/new Alt-o in
> >Options/Configuration.
> >
> >Personally I vote for 2) because mc won't lose any of its functionality
> >and it won't need too much work IMHO.
> >
> >  
> >
> May be 2) and 3) both? To avoid discrimination of old-style (or 
> new-style) users...

You guys raise good points.

I will make it a configuration feature, and restore the old behavior by
default.

Miguel.
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: Restoring the functionality of Alt-o

2005-01-31 Thread Pavel Tsekov
Hello,

On Mon, 31 Jan 2005, Jindrich Novy wrote:

> 2) Create an alternate keyboard shortcut such as Alt-i that acts like
> the old Alt-o.
>
> 3) Keep Alt-o shortcut and switch between old/new Alt-o in
> Options/Configuration.
>
> Personally I vote for 2) because mc won't lose any of its functionality
> and it won't need too much work IMHO.

I vote for solution number 3. I never was aware of the "old" Alt + O
functionality but I frequently use the "new" behaviour.

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: Restoring the functionality of Alt-o

2005-01-31 Thread Oswald Buddenhagen
On Mon, Jan 31, 2005 at 03:11:37PM +0300, buc wrote:
> Jindrich Novy wrote:
> >Let me propose some possibilities:
> >
> >1) Revert Alt-o -> annoyed users because Alt-o suddenly changes.
> >
definitely. i never used the old alt-o, but i'm sort of addicted to the
new one.

> >2) Create an alternate keyboard shortcut such as Alt-i that acts like
> >the old Alt-o.
> >
this has my vote, too.
i _guess_ meanwhile there are more new-style users ...

> >3) Keep Alt-o shortcut and switch between old/new Alt-o in
> >Options/Configuration.
> >
> May be 2) and 3) both? To avoid discrimination of old-style (or 
> new-style) users...
> 
configurability at its best ... :{

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: Restoring the functionality of Alt-o

2005-01-31 Thread buc
Jindrich Novy wrote:
Let me propose some possibilities:
1) Revert Alt-o -> annoyed users because Alt-o suddenly changes.
2) Create an alternate keyboard shortcut such as Alt-i that acts like
the old Alt-o.
3) Keep Alt-o shortcut and switch between old/new Alt-o in
Options/Configuration.
Personally I vote for 2) because mc won't lose any of its functionality
and it won't need too much work IMHO.
 

May be 2) and 3) both? To avoid discrimination of old-style (or 
new-style) users...

--
Dmitry Butskoj <[EMAIL PROTECTED]>
Saint-Petersburg, Russia
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: Restoring the functionality of Alt-o

2005-01-31 Thread buc
Pavel Shirshov (pchel) wrote:
Hello Miguel,
Sunday, January 30, 2005, 9:40:03 AM, you wrote:
MdI> A long time ago I added Alt-o as a binding that would help in
MdI> navigating directories.  The idea is that in one panel you press Alt-o,
MdI> and if the selection is on a directory, it will load the contents of the
MdI> highlighted directory into the other panel.  If no directory was
MdI> selected, this was a no-op.
MdI> At some point this behavior was removed from mc, and now instead it
MdI> just loads the current directory on the other panel, which is not very
MdI> useful for navigating anything.
http://mail.gnome.org/archives/mc-devel/2002-November/msg00039.html
MdI> I remember having this discussion with Pavel but I forget the
MdI> rationale for it.  I would like to get this change reverted in CVS.  Any
MdI> objections?
I'm agreed with you. Old behavior of ALT-O is more good.
 

Yes, the old variant is more preferable, and we patch upstream releases 
each time for it.
My variant attached (as an example). It is against latest RedHat`s 
fedora-devel build.

--
Dmitry Butskoj <[EMAIL PROTECTED]>
Saint-Petersburg, Russia
Red Hat Certified Engineer 809003662809495
diff -Nrbu mc-4.6.1-20041108/src/screen.c mc-4.6.1-20041108-OK/src/screen.c
--- mc-4.6.1-20041108/src/screen.c	2004-11-23 20:05:42.0 +0300
+++ mc-4.6.1-20041108-OK/src/screen.c	2004-11-23 20:05:30.0 +0300
@@ -2140,25 +2140,25 @@
 return do_enter_on_file_entry (selection (panel));
 }
 
-/*
- * Make the current directory of the current panel also the current
- * directory of the other panel.  Put the other panel to the listing
- * mode if needed.  If the current panel is panelized, the other panel
- * doesn't become panelized.
- */
 static void
 chdir_other_panel (WPanel *panel)
 {
+char *new_dir;
+ 
 if (get_other_type () != view_listing) {
 	set_display_type (get_other_index (), view_listing);
 }
 
-do_panel_cd (other_panel, current_panel->cwd, cd_exact);
+if (!S_ISDIR (panel->dir.list [panel->selected].st.st_mode))
+new_dir = concat_dir_and_file (panel->cwd, "..");
+else
+new_dir = concat_dir_and_file (panel->cwd, panel->dir.list [panel->selected].fname);
+
+do_panel_cd (other_panel, new_dir, cd_exact);
 
-/* try to select current filename on the other panel */
-if (!panel->is_panelized) {
-	try_to_select (other_panel, selection (panel)->fname);
-}
+move_down (panel);
+
+g_free (new_dir);
 }
 
 static void
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: Restoring the functionality of Alt-o

2005-01-31 Thread Jindrich Novy
Hello Miguel,

On Sat, 2005-01-29 at 23:40 -0500, Miguel de Icaza wrote:
> Hello,
> 
> A long time ago I added Alt-o as a binding that would help in
> navigating directories.  The idea is that in one panel you press Alt-o,
> and if the selection is on a directory, it will load the contents of the
> highlighted directory into the other panel.  If no directory was
> selected, this was a no-op.
> 
> At some point this behavior was removed from mc, and now instead it
> just loads the current directory on the other panel, which is not very
> useful for navigating anything.
> 
> I remember having this discussion with Pavel but I forget the
> rationale for it.  I would like to get this change reverted in CVS.  Any
> objections?

The old behavior of Alt-o seems helpful to me, but still many users use
the new Alt-o to sync contents within both panels, what is also fine. 

Let me propose some possibilities:

1) Revert Alt-o -> annoyed users because Alt-o suddenly changes.

2) Create an alternate keyboard shortcut such as Alt-i that acts like
the old Alt-o.

3) Keep Alt-o shortcut and switch between old/new Alt-o in
Options/Configuration.

Personally I vote for 2) because mc won't lose any of its functionality
and it won't need too much work IMHO.

-- 
Jindrich Novy <[EMAIL PROTECTED]>, http://people.redhat.com/jnovy/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: Debian security advisory

2005-01-31 Thread Andrew V. Samoilov
Hi Leonard,

> On Sun, 2005-01-30 at 14:57, Roland Illig wrote:
> > My question is: How can we get the details of the vulnerabilities? A 
> > statement like "mc contains buffer overflows" doesn't help me. I know 
> > that myself. But where is it? Knowing the particular file or a use case 
> > would help a lot.
> 
> Yup. Andrew, could you please also post these patches for CAN
> vulnerabilities here? That would come in handy :) .

Well, all of these are backports from our CVS.
It seems it was noticed in the description.

-- 
Regards,
Andrew V. Samoilov


GET INTERNET ACCESS FROM BCS! http://www.bcs.zp.ua
Join BCS today! For your FREE webmail, visit: http://email.zp.ua/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: Restoring the functionality of Alt-o

2005-01-31 Thread Andrew V. Samoilov
Hello Miguel, Pavel

> Sunday, January 30, 2005, 9:40:03 AM, you wrote:
> 
> MdI> A long time ago I added Alt-o as a binding that would help in
> MdI> navigating directories.  The idea is that in one panel you press Alt-o,
> MdI> and if the selection is on a directory, it will load the contents of the
> MdI> highlighted directory into the other panel.  If no directory was
> MdI> selected, this was a no-op.
> 
> MdI> At some point this behavior was removed from mc, and now instead it
> MdI> just loads the current directory on the other panel, which is not very
> MdI> useful for navigating anything.
> 
>  http://mail.gnome.org/archives/mc-devel/2002-November/msg00039.html
> 
> MdI> I remember having this discussion with Pavel but I forget the
> MdI> rationale for it.  I would like to get this change reverted in CVS.  Any
> MdI> objections?
> 
>  I'm agreed with you. Old behavior of ALT-O is more good.

And now it seems it was some harry move to remove '..' from directory listing.

-- 
Regards,
Andrew V. Samoilov


GET INTERNET ACCESS FROM BCS! http://www.bcs.zp.ua
Join BCS today! For your FREE webmail, visit: http://email.zp.ua/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: Restoring the functionality of Alt-o

2005-01-31 Thread Pavel Shirshov (pchel)
Hello Miguel,

Sunday, January 30, 2005, 9:40:03 AM, you wrote:

MdI> A long time ago I added Alt-o as a binding that would help in
MdI> navigating directories.  The idea is that in one panel you press Alt-o,
MdI> and if the selection is on a directory, it will load the contents of the
MdI> highlighted directory into the other panel.  If no directory was
MdI> selected, this was a no-op.

MdI> At some point this behavior was removed from mc, and now instead it
MdI> just loads the current directory on the other panel, which is not very
MdI> useful for navigating anything.

 http://mail.gnome.org/archives/mc-devel/2002-November/msg00039.html

MdI> I remember having this discussion with Pavel but I forget the
MdI> rationale for it.  I would like to get this change reverted in CVS.  Any
MdI> objections?

 I'm agreed with you. Old behavior of ALT-O is more good.

-- 
Best regards,
 Pavelmailto:[EMAIL PROTECTED]

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel