ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] Minor issue with user name


From: Stuart Hughes
Subject: Re: [Ltib] Minor issue with user name
Date: Wed, 21 Mar 2007 10:26:29 +0000

Hi Wolfi,

Thanks for your clear bug report.  I'm going to check in the following
change:

cvs diff -u ltib
Index: ltib
===================================================================
RCS file: /sources/ltib/ltib/ltib,v
retrieving revision 1.8
diff -u -u -r1.8 ltib
--- ltib        17 Jan 2007 11:19:50 -0000      1.8
+++ ltib        21 Mar 2007 10:21:40 -0000
@@ -2182,6 +2182,7 @@
     # we need to make a known rpm using the host's rpm first of all
     # we use a bogus database area
     $cf->{rpmdir} = "/tmp/rpm-$cf->{username}";
+    $cf->{rpmdir} =~ s,[\\],-,g;
     $cf->{rpmdb}  = "$cf->{rpmdir}/rpmdb";
     mk_rpm_dirs($cf->{rpmdir}, $cf->{rpmdb}, 
"$cf->{rpmdir}/rootfs",$cf->{tmppath});
     f_buildrpms() or die;

What this does is as you suggest is to change any '\' character to '-'.
If there are other problem characters, we can easily extend the
character class expression.

I don't have any way of testing this, so maybe when it's convenient you
can try this out.  To do this, you'd need to manually
remove /opt/ltib/usr/bin/rpm and .host_wait_warning* before re-running
ltib. 

Regards, Stuart


On Wed, 2007-03-21 at 08:24 +0100, Stering Wolfram wrote:
> Hi ltib'ers,
> 
> I'm new to this list, and to ltib as whole, but I succeeded to build the
> BSP for the i.XM31 eval board, after a minor issue was hacked around (I
> didn't solve it, though):
> 
> In certain cases, the username, as returned by perl's getpw*() functions
> (getpwuid($<) is used by ltib) contains a '\' (backslash) character. A
> likely example would be authentication with a Windows domain controller
> using ADS via winbind (which is not so uncommon in company networks,
> I've been told).  In this case, the username contains the domain part in
> "windows notation", i.e. 'DOMAIN\USER'.
> 
> However, this will result in problems where the username becomes e.g.
> part of a filename, such as '/tmp/rpm-<username>', and possibly in other
> cases as well.
> 
> My humble suggestion would be to replace the '\' characters in the
> username ($cf->username) with e.g. '_'.  But then, some diagnostic
> output, especially the help line on how to modify the sudoers-file,
> doesn't show the actual username (the same applies to the release info:
> write_release_info()).  Probably all characters that are invalid for
> filenames need to be replaced.
> 
> Or else just do the substitution, when the username is used in a context
> where this is important.
> 
> Unfortunately I'm not good enough in perl to provide a corresponding
> patch myself, otherwise I'd have done so.
> 
> best regards,
> 
> -wolfi
> 
> 
> --
> Wolfram Stering
> Salzburg, Austria
> 
> 
> --
> Scanned by MailScanner.
> 
> 
> 
> _______________________________________________
> LTIB home page: http://bitshrine.org
> 
> Ltib mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/ltib





reply via email to

[Prev in Thread] Current Thread [Next in Thread]