Bug#806882: libc-bin: unable to set pts permissions (and open a terminal...)

2015-12-04 Thread Jakub Wilk

usertags 806882 + serious
thanks

I've been bitten by it too...

Couldn't libc just leave ownership/permission as they are if /dev/pts 
is a devpts filesystem?


* Domenico Andreoli , 2015-12-02, 17:13:

$ grep devpts /etc/fstab
none  /mnt/sid64/dev/pts devpts   defaults
0   0
none  /mnt/sid64/home/chernobyl/dev/pts  devpts   defaults
0   0


"defaults" are not correct options. You need "gid=5" at least.

All devpts fstab entries need to have correct options, because all 
devpts filesystems are shared by default. (You can probably use the 
"newinstance" option to disable sharing them.)


--
Jakub Wilk



Australia Cider Market Insights

2015-12-04 Thread Drink Sector
83 Pages - £2810
United Kingdom Cider Market Insights 2015
This report provides a detailed overview of the cider market in the United 
Kingdom. The report details market size, market growth and market value and 
looks at current and emerging trends as well as analyzing the market for 
imports 
and exports.
In-depth brand analysis is provided along with packaging data, industry 
structure, 
channel analysis and legislation and pricing. Historical data and latest 
forecasts 
are provided along with analysis of the key companies active within this sector.
View table of contents:
http://drinksector.com/reports/united-kingdom-cider-market-insights-2015
Order online:
http://drinksector.com/basket.asp?basketAction=add=560
Cider market insights are also available for a further 20 countries listed 
below:
Australia Cider Market Insights 2015
http://www.drinksector.com/reports/australia-cider-market-insights-2015
Austria Cider Market Insights 2015
http://www.drinksector.com/reports/austria-cider-market-insights-2015

Belgium Cider Market Insights 2015
http://www.drinksector.com/reports/belgium-cider-market-insights-2015

Canada Cider Market Insights 2015
http://www.drinksector.com/reports/canada-cider-market-insights-2015

Denmark Cider Market Insights 2015
http://www.drinksector.com/reports/denmark-cider-market-insights-2015

Estonia Cider Market Insights 2015
http://www.drinksector.com/reports/estonia-cider-market-insights-2015

Finland Cider Market Insights 2015
http://www.drinksector.com/reports/finland-cider-market-insights-2015

France Cider Market Insights 2015
http://www.drinksector.com/reports/france-cider-market-insights-2015

Germany Cider Market Insights 2015
http://www.drinksector.com/reports/germany-cider-market-insights-2015

Lithuania Cider Market Insights 2015
http://www.drinksector.com/reports/lithuania-cider-market-insights-2015

Minor Markets Cider Market Insights Report 2015
http://drinksector.com/reports/minor-markets-cider-market-insights-report-2015

Netherlands Cider Market Insights 2015
http://www.drinksector.com/reports/netherlands-cider-market-insights-2015

New Zealand Cider Market Insights 2015
http://www.drinksector.com/reports/new-zealand-cider-market-insights-2015

Republic of Ireland Cider Market Insights 2015
http://www.drinksector.com/reports/republic-of-ireland-cider-market-insights-2015

South Africa Cider Market Insights 2015
http://www.drinksector.com/reports/south-africa-cider-market-insights-2015

Spain Cider Market Insights 2015
http://www.drinksector.com/reports/spain-cider-market-insights-2015

Sweden Cider Market Insights 2015
http://www.drinksector.com/reports/sweden-cider-market-insights-2015

Switzerland Cider Market Insights 2015
http://www.drinksector.com/reports/swizterland-cider-market-insights-2015

USA Cider Market Insights 2015
http://www.drinksector.com/reports/usa-cider-market-insights-2015

Please contact us if you have any questions or any other requirements.

Drink Sector
Email: i...@drinksector.com
Tel: +44 (0) 758 718 3397
Web: http://www.drinksector.com
 
 
Receive free email notifications of the latest beverage industry research, 
sign up online at:
http://www.drinksector.com/subscribe.asp
 
 
Should you wish to be removed from this email list, please enter 
glibc-ma...@debian.org
at: www.drinksector.com/unsubscribe.asp


r6771 - in glibc-package/branches/glibc-2.22/debian: . testsuite-checking

2015-12-04 Thread Aurelien Jarno
Author: aurel32
Date: 2015-12-04 09:55:11 + (Fri, 04 Dec 2015)
New Revision: 6771

Modified:
   glibc-package/branches/glibc-2.22/debian/changelog
   
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i586-linux-gnu-libc
   
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-i386
   
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-i686
   
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-libc
   
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-xen
Log:
debian/testsuite-checking/expected-results-i?86-linux-gnu-*: cleanup
resolved issues.

Modified: glibc-package/branches/glibc-2.22/debian/changelog
===
--- glibc-package/branches/glibc-2.22/debian/changelog  2015-12-03 23:26:24 UTC 
(rev 6770)
+++ glibc-package/branches/glibc-2.22/debian/changelog  2015-12-04 09:55:11 UTC 
(rev 6771)
@@ -31,6 +31,8 @@
 i586 ULPs.
   * debian/patches/git-updates.diff: update to the latest commit of the
 2.22 branch.
+  * debian/testsuite-checking/expected-results-i?86-linux-gnu-*: cleanup
+resolved issues.
 
  -- Aurelien Jarno   Wed, 02 Dec 2015 01:10:00 +0100
 

Modified: 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i586-linux-gnu-libc
===
--- 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i586-linux-gnu-libc
2015-12-03 23:26:24 UTC (rev 6770)
+++ 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i586-linux-gnu-libc
2015-12-04 09:55:11 UTC (rev 6771)
@@ -1,11 +1,10 @@
 #
 # Allowed failures for i586-linux-gnu-libc
 #
-posix/annexc
 debug/tst-backtrace6
+posix/tst-waitid
+rt/tst-cputimer1
 rt/tst-cpuclock2
 rt/tst-mqueue5
 rt/tst-timer
-posix/tst-waitid
-rt/tst-cputimer1
 nptl/tst-cleanupx4

Modified: 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-i386
===
--- 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-i386
2015-12-03 23:26:24 UTC (rev 6770)
+++ 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-i386
2015-12-04 09:55:11 UTC (rev 6771)
@@ -1,11 +1,10 @@
 #
 # Allowed failures for i686-linux-gnu-i386
 #
-posix/annexc
 debug/tst-backtrace6
+posix/tst-waitid
+rt/tst-cputimer1
 rt/tst-cpuclock2
 rt/tst-mqueue5
 rt/tst-timer
-posix/tst-waitid
-rt/tst-cputimer1
 nptl/tst-cleanupx4

Modified: 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-i686
===
--- 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-i686
2015-12-03 23:26:24 UTC (rev 6770)
+++ 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-i686
2015-12-04 09:55:11 UTC (rev 6771)
@@ -1,11 +1,10 @@
 #
 # Allowed failures for i686-linux-gnu-i686
 #
-posix/annexc
 debug/tst-backtrace6
+posix/tst-waitid
+rt/tst-cputimer1
 rt/tst-cpuclock2
 rt/tst-mqueue5
 rt/tst-timer
-posix/tst-waitid
-rt/tst-cputimer1
 nptl/tst-cleanupx4

Modified: 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-libc
===
--- 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-libc
2015-12-03 23:26:24 UTC (rev 6770)
+++ 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-libc
2015-12-04 09:55:11 UTC (rev 6771)
@@ -1,11 +1,10 @@
 #
 # Allowed failures for i686-linux-gnu-libc
 #
-posix/annexc
 debug/tst-backtrace6
+posix/tst-waitid
 rt/tst-cpuclock2
+rt/tst-cputimer1
 rt/tst-mqueue5
 rt/tst-timer
-posix/tst-waitid
-rt/tst-cputimer1
 nptl/tst-cleanupx4

Modified: 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-xen
===
--- 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-xen
 2015-12-03 23:26:24 UTC (rev 6770)
+++ 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-i686-linux-gnu-xen
 2015-12-04 09:55:11 UTC (rev 6771)
@@ -1,11 +1,10 @@
 #
 # Allowed failures for i686-linux-gnu-xen
 #
-posix/annexc
 debug/tst-backtrace6
+posix/tst-waitid
 rt/tst-cpuclock2
+rt/tst-cputimer1
 rt/tst-mqueue5
 rt/tst-timer
-posix/tst-waitid
-rt/tst-cputimer1
 nptl/tst-cleanupx4



r6773 - in glibc-package/branches/glibc-2.22/debian: . testsuite-checking

2015-12-04 Thread Aurelien Jarno
Author: aurel32
Date: 2015-12-04 09:56:39 + (Fri, 04 Dec 2015)
New Revision: 6773

Modified:
   glibc-package/branches/glibc-2.22/debian/changelog
   
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnux32-libc
   
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnux32-x32
Log:
debian/testsuite-checking/expected-results-x86_64-linux-gnux32-*:
update and cleanup resolved issues.

Modified: glibc-package/branches/glibc-2.22/debian/changelog
===
--- glibc-package/branches/glibc-2.22/debian/changelog  2015-12-04 09:55:52 UTC 
(rev 6772)
+++ glibc-package/branches/glibc-2.22/debian/changelog  2015-12-04 09:56:39 UTC 
(rev 6773)
@@ -35,6 +35,8 @@
 resolved issues.
   * debian/testsuite-checking/expected-results-x86_64-linux-gnu-*: cleanup
 resolved issues.
+  * debian/testsuite-checking/expected-results-x86_64-linux-gnux32-*:
+update and cleanup resolved issues.
 
  -- Aurelien Jarno   Wed, 02 Dec 2015 01:10:00 +0100
 

Modified: 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnux32-libc
===
--- 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnux32-libc
   2015-12-04 09:55:52 UTC (rev 6772)
+++ 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnux32-libc
   2015-12-04 09:56:39 UTC (rev 6773)
@@ -1,14 +1,6 @@
 #
 # Allowed failures for x86_64-linux-gnux32-libc
 #
-posix/annexc
-debug/tst-backtrace6
-rt/tst-cpuclock2
-rt/tst-mqueue5
-rt/tst-timer
-posix/tst-waitid
-misc/tst-writev
-rt/tst-cputimer1
 conform/ISO11/time.h/conform
 conform/POSIX2008/mqueue.h/conform
 conform/POSIX2008/sys/select.h/conform
@@ -21,7 +13,14 @@
 conform/UNIX98/sched.h/conform
 conform/UNIX98/time.h/conform
 conform/XOPEN2K8/mqueue.h/conform
+conform/XOPEN2K8/sys/select.h/conform
 conform/XOPEN2K8/sys/stat.h/conform
 conform/XOPEN2K8/time.h/conform
 conform/XOPEN2K/sys/select.h/conform
 conform/XOPEN2K/time.h/conform
+debug/tst-backtrace6
+posix/tst-waitid
+rt/tst-cpuclock2
+rt/tst-cputimer1
+rt/tst-mqueue5
+rt/tst-timer

Modified: 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnux32-x32
===
--- 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnux32-x32
2015-12-04 09:55:52 UTC (rev 6772)
+++ 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnux32-x32
2015-12-04 09:56:39 UTC (rev 6773)
@@ -1,17 +1,6 @@
 #
 # Allowed failures for x86_64-linux-gnux32-x32
 #
-posix/annexc
-elf/ifuncmain1staticpie
-elf/ifuncmain6pie
-elf/ifuncmain7pie
-debug/tst-backtrace6
-rt/tst-cpuclock2
-rt/tst-mqueue5
-rt/tst-timer
-posix/tst-waitid
-misc/tst-writev
-rt/tst-cputimer1
 conform/ISO11/time.h/conform
 conform/POSIX2008/mqueue.h/conform
 conform/POSIX2008/sys/select.h/conform
@@ -24,7 +13,17 @@
 conform/UNIX98/sched.h/conform
 conform/UNIX98/time.h/conform
 conform/XOPEN2K8/mqueue.h/conform
+conform/XOPEN2K8/sys/select.h/conform
 conform/XOPEN2K8/sys/stat.h/conform
 conform/XOPEN2K8/time.h/conform
 conform/XOPEN2K/sys/select.h/conform
 conform/XOPEN2K/time.h/conform
+debug/tst-backtrace6
+elf/ifuncmain1staticpie
+elf/ifuncmain6pie
+elf/ifuncmain7pie
+posix/tst-waitid
+rt/tst-cpuclock2
+rt/tst-cputimer1
+rt/tst-mqueue5
+rt/tst-timer



r6772 - in glibc-package/branches/glibc-2.22/debian: . testsuite-checking

2015-12-04 Thread Aurelien Jarno
Author: aurel32
Date: 2015-12-04 09:55:52 + (Fri, 04 Dec 2015)
New Revision: 6772

Modified:
   glibc-package/branches/glibc-2.22/debian/changelog
   
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnu-amd64
   
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnu-libc
Log:
debian/testsuite-checking/expected-results-x86_64-linux-gnu-*: cleanup
resolved issues.

Modified: glibc-package/branches/glibc-2.22/debian/changelog
===
--- glibc-package/branches/glibc-2.22/debian/changelog  2015-12-04 09:55:11 UTC 
(rev 6771)
+++ glibc-package/branches/glibc-2.22/debian/changelog  2015-12-04 09:55:52 UTC 
(rev 6772)
@@ -33,6 +33,8 @@
 2.22 branch.
   * debian/testsuite-checking/expected-results-i?86-linux-gnu-*: cleanup
 resolved issues.
+  * debian/testsuite-checking/expected-results-x86_64-linux-gnu-*: cleanup
+resolved issues.
 
  -- Aurelien Jarno   Wed, 02 Dec 2015 01:10:00 +0100
 

Modified: 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnu-amd64
===
--- 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnu-amd64
 2015-12-04 09:55:11 UTC (rev 6771)
+++ 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnu-amd64
 2015-12-04 09:55:52 UTC (rev 6772)
@@ -1,11 +1,9 @@
 #
 # Allowed failures for x86_64-linux-gnu-amd64
 #
-posix/annexc
 debug/tst-backtrace6
+posix/tst-waitid
 rt/tst-cpuclock2
+rt/tst-cputimer1
 rt/tst-mqueue5
 rt/tst-timer
-posix/tst-waitid
-misc/tst-writev
-rt/tst-cputimer1

Modified: 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnu-libc
===
--- 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnu-libc
  2015-12-04 09:55:11 UTC (rev 6771)
+++ 
glibc-package/branches/glibc-2.22/debian/testsuite-checking/expected-results-x86_64-linux-gnu-libc
  2015-12-04 09:55:52 UTC (rev 6772)
@@ -1,11 +1,9 @@
 #
 # Allowed failures for x86_64-linux-gnu-libc
 #
-posix/annexc
 debug/tst-backtrace6
+posix/tst-waitid
 rt/tst-cpuclock2
+rt/tst-cputimer1
 rt/tst-mqueue5
 rt/tst-timer
-posix/tst-waitid
-misc/tst-writev
-rt/tst-cputimer1



r6774 - in glibc-package/branches/glibc-2.22/debian: . sysdeps

2015-12-04 Thread Aurelien Jarno
Author: aurel32
Date: 2015-12-04 11:34:05 + (Fri, 04 Dec 2015)
New Revision: 6774

Modified:
   glibc-package/branches/glibc-2.22/debian/changelog
   glibc-package/branches/glibc-2.22/debian/sysdeps/ppc64el.mk
Log:
debian/sysdeps/ppc64el.mk: default to POWER8.



Modified: glibc-package/branches/glibc-2.22/debian/changelog
===
--- glibc-package/branches/glibc-2.22/debian/changelog  2015-12-04 09:56:39 UTC 
(rev 6773)
+++ glibc-package/branches/glibc-2.22/debian/changelog  2015-12-04 11:34:05 UTC 
(rev 6774)
@@ -9,7 +9,7 @@
 - Update to glibc 2.22.
   * debian/patches/kfreebsd/local-tst-malloc-backtrace.diff: new patch to fix
 tst-malloc-backtrace on GNU/kFreeBSD.
-  * debian/sysdeps/ppc64el.mk: use default gcc options.
+  * debian/sysdeps/ppc64el.mk: default to POWER8 and use default gcc options.
   * debian/rules.d/build.mk: explicitly disable mathvec when mvec=no.
   * debian/testsuite-checking/expected-results-s390x-linux-gnu-libc:
 allow elf/tst-protected1a and elf/tst-protected1b to fail as they are

Modified: glibc-package/branches/glibc-2.22/debian/sysdeps/ppc64el.mk
===
--- glibc-package/branches/glibc-2.22/debian/sysdeps/ppc64el.mk 2015-12-04 
09:56:39 UTC (rev 6773)
+++ glibc-package/branches/glibc-2.22/debian/sysdeps/ppc64el.mk 2015-12-04 
11:34:05 UTC (rev 6774)
@@ -1,2 +1,2 @@
 libc_rtlddir = /lib64
-extra_config_options = --enable-multi-arch --enable-lock-elision
+extra_config_options = --enable-multi-arch --enable-lock-elision 
--with-cpu=power8



Bug#806882: libc-bin: unable to set pts permissions (and open a terminal...)

2015-12-04 Thread Aurelien Jarno
On 2015-12-04 11:52, Jakub Wilk wrote:
> usertags 806882 + serious
> thanks
> 
> I've been bitten by it too...
> 
> Couldn't libc just leave ownership/permission as they are if /dev/pts is a
> devpts filesystem?

What do you mean? The libc doesn't change anymore the permissions
(pt_chown has been removed for security reasons), and that's actually
the issue.

> * Domenico Andreoli , 2015-12-02, 17:13:
> >$ grep devpts /etc/fstab
> >none  /mnt/sid64/dev/pts devpts   defaults
> >0   0
> >none  /mnt/sid64/home/chernobyl/dev/pts  devpts   defaults
> >0   0
> 
> "defaults" are not correct options. You need "gid=5" at least.

Well they are the one in the chroots...

> All devpts fstab entries need to have correct options, because all devpts
> filesystems are shared by default. (You can probably use the "newinstance"
> option to disable sharing them.)

You really mean the other entries in the fstab are causing the
permissions of /dev/pts to be changed?

In that case given the issue is due to a user misconfiguration, I guess
we should just try to detect it, display a note and fail the
installation.

Aurelien

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net



Bug#806882: libc-bin: unable to set pts permissions (and open a terminal...)

2015-12-04 Thread Aurelien Jarno
On 2015-12-04 17:20, Jakub Wilk wrote:
> Hi Aurelien!
> 
> Thanks for looking into this bug.
> 
> * Aurelien Jarno , 2015-12-04, 15:05:
> >>Couldn't libc just leave ownership/permission as they are if /dev/pts is
> >>a devpts filesystem?
> >
> >What do you mean? The libc doesn't change anymore the permissions
> >(pt_chown has been removed for security reasons), and that's actually the
> >issue.
> 
> grantpt() calls chown() or chmod() if the device ownership or mode is not
> what it expects. See sysdeps/unix/grantpt.c, lines 130-171.
> 
> And it Domenico's strace output, it was chown() that failed:
> 
> chown("/dev/pts/2", 1000, 5)= -1 EPERM (Operation not permitted)
> 
> Now, I realize that changing ownership and permissions of the device is
> exactly what grantpt() is documented to do. The problem is that it turns a
> minor configuration problem (devpts mounted without gid=5) into a big
> usability problem, which is difficult to debug.
> 
> IMO it'd be practical for glibc to assume that the devpts filesystem is
> always correctly configured and that changing ownership and permissions is
> not necessary. This would also fix bug #705056.

It might be practical and might work when grantpt() is preceded by the
call to posix_openpt(). It might break some programs which do other
things in between and which really assume that grantpt() is going to do
what it is supposed to do. It might even have some security implications.

And it will also likely be a POSIX violation as it clearly precise the
mode and the group to be used.

> >>* Domenico Andreoli , 2015-12-02, 17:13:
> >>>$ grep devpts /etc/fstab
> >>>none  /mnt/sid64/dev/pts devpts   defaults
> >>>0   0
> >>>none  /mnt/sid64/home/chernobyl/dev/pts  devpts   defaults
> >>>0   0
> >>
> >>"defaults" are not correct options. You need "gid=5" at least.
> >
> >Well they are the one in the chroots...
> >
> >>All devpts fstab entries need to have correct options, because all
> >>devpts filesystems are shared by default. (You can probably use the
> >>"newinstance" option to disable sharing them.)
> >
> >You really mean the other entries in the fstab are causing the permissions
> >of /dev/pts to be changed?
> 
> It's very surprising, but yet, this is the case, at least on Linux:
> 
> # mount | grep /dev/pts
> devpts on /dev/pts type devpts 
> (rw,nosuid,noexec,relatime,gid=5,mode=600,ptmxmode=000)
> # mount -t devpts devpts /mnt
> # mount | grep devpts
> devpts on /dev/pts type devpts 
> (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
> devpts on /mnt type devpts (rw,relatime,mode=600,ptmxmode=000)
> 
> As you can see, options changed for both mounts.

That's totally stupid and it seems to be also the case for chroots. And
it seems that at least cowbuilder is mounting /dev/pts in the chroot
with the default options.

> >In that case given the issue is due to a user misconfiguration, I guess we
> >should just try to detect it, display a note and fail the installation.
> 
> Warning the user would be certainly a good idea. But of course that would
> only help if the devpts filesystem was misconfigured at installation time.
> For me, this wasn't the case.

What was the issue on your case?

Aurelien

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net



Bug#806882: libc-bin: unable to set pts permissions (and open a terminal...)

2015-12-04 Thread Jakub Wilk

Hi Aurelien!

Thanks for looking into this bug.

* Aurelien Jarno , 2015-12-04, 15:05:
Couldn't libc just leave ownership/permission as they are if /dev/pts 
is a devpts filesystem?


What do you mean? The libc doesn't change anymore the permissions 
(pt_chown has been removed for security reasons), and that's actually 
the issue.


grantpt() calls chown() or chmod() if the device ownership or mode is 
not what it expects. See sysdeps/unix/grantpt.c, lines 130-171.


And it Domenico's strace output, it was chown() that failed:

chown("/dev/pts/2", 1000, 5)= -1 EPERM (Operation not permitted)

Now, I realize that changing ownership and permissions of the device is 
exactly what grantpt() is documented to do. The problem is that it turns 
a minor configuration problem (devpts mounted without gid=5) into a big 
usability problem, which is difficult to debug.


IMO it'd be practical for glibc to assume that the devpts filesystem is 
always correctly configured and that changing ownership and permissions 
is not necessary. This would also fix bug #705056.



* Domenico Andreoli , 2015-12-02, 17:13:

$ grep devpts /etc/fstab
none  /mnt/sid64/dev/pts devpts   defaults
0   0
none  /mnt/sid64/home/chernobyl/dev/pts  devpts   defaults
0   0


"defaults" are not correct options. You need "gid=5" at least.


Well they are the one in the chroots...

All devpts fstab entries need to have correct options, because all 
devpts filesystems are shared by default. (You can probably use the 
"newinstance" option to disable sharing them.)


You really mean the other entries in the fstab are causing the 
permissions of /dev/pts to be changed?


It's very surprising, but yet, this is the case, at least on Linux:

# mount | grep /dev/pts
devpts on /dev/pts type devpts 
(rw,nosuid,noexec,relatime,gid=5,mode=600,ptmxmode=000)
# mount -t devpts devpts /mnt
# mount | grep devpts
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
devpts on /mnt type devpts (rw,relatime,mode=600,ptmxmode=000)

As you can see, options changed for both mounts.

In that case given the issue is due to a user misconfiguration, I guess 
we should just try to detect it, display a note and fail the 
installation.


Warning the user would be certainly a good idea. But of course that 
would only help if the devpts filesystem was misconfigured at 
installation time. For me, this wasn't the case.


--
Jakub Wilk