All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails
@ 2014-09-03 17:09 bugzilla at busybox.net
  2014-09-03 18:02 ` [Buildroot] [Bug 7364] " bugzilla at busybox.net
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-03 17:09 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

           Summary: monit doesn't start with glibc 2.19 because geteuid()
                    fails
           Product: buildroot
           Version: 2014.08
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Other
        AssignedTo: unassigned at buildroot.uclibc.org
        ReportedBy: syntheticpp at gmx.net
                CC: buildroot at uclibc.org
   Estimated Hours: 0.0


monit exits in src/env.c:

  struct passwd *pw;

  /* Get password struct */
  if ( ! (pw= getpwuid(geteuid())) ) {
    LogError("%s: You don't exist. Go away.\n", prog);
    exit(1);
  }

Only happens with glibc and eglibc 2.19 (tested with GCC 4.9.1), 2.18 is fine.

GCC warns while linking:
y.tab.c:(.text+0x379c): warning: Using 'getpwuid' in statically linked
applications requires at runtime the shared libraries from the glibc version
used for linking

Somehow libnss related?

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit doesn't start with glibc 2.19 because geteuid() fails
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
@ 2014-09-03 18:02 ` bugzilla at busybox.net
  2014-09-03 18:57 ` bugzilla at busybox.net
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-03 18:02 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

--- Comment #1 from syntheticpp at gmx.net 2014-09-03 18:02:48 UTC ---
Logging in via ssh is delayed, looks like it runs into a timeout.
(strace shows that a select() on the client IP is paused)

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit doesn't start with glibc 2.19 because geteuid() fails
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
  2014-09-03 18:02 ` [Buildroot] [Bug 7364] " bugzilla at busybox.net
@ 2014-09-03 18:57 ` bugzilla at busybox.net
  2014-09-04 12:22 ` bugzilla at busybox.net
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-03 18:57 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

Yann E. MORIN <yann.morin.1998@free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yann.morin.1998 at free.fr

--- Comment #2 from Yann E. MORIN <yann.morin.1998@free.fr> 2014-09-03 18:57:16 UTC ---
Normally, static linking with glibc is not possible, just because of
this issue: all that has to deal with names (usernames, groups,
hostnames...) need dynamic linking, becasue glibc uses libnss, which
dlopen()s the backend libraries, such as libnss_files.so.

How did you manage to have a statically-linked monit when using a
glibc toolchain? Care to share your .config, please?

Regards,
Yann E. MORIN.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit doesn't start with glibc 2.19 because geteuid() fails
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
  2014-09-03 18:02 ` [Buildroot] [Bug 7364] " bugzilla at busybox.net
  2014-09-03 18:57 ` bugzilla at busybox.net
@ 2014-09-04 12:22 ` bugzilla at busybox.net
  2014-09-04 12:27 ` bugzilla at busybox.net
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-04 12:22 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

--- Comment #3 from syntheticpp at gmx.net 2014-09-04 12:22:51 UTC ---
> 
> How did you manage to have a statically-linked monit when using a
> glibc toolchain? Care to share your .config, please?
> 

It's the configuration of 2014.08 no changes by me.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit doesn't start with glibc 2.19 because geteuid() fails
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
                   ` (2 preceding siblings ...)
  2014-09-04 12:22 ` bugzilla at busybox.net
@ 2014-09-04 12:27 ` bugzilla at busybox.net
  2014-09-04 15:52 ` bugzilla at busybox.net
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-04 12:27 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

--- Comment #4 from syntheticpp at gmx.net 2014-09-04 12:27:59 UTC ---
> 
> GCC warns while linking:
> y.tab.c:(.text+0x379c): warning: Using 'getpwuid' in statically linked
> applications requires at runtime the shared libraries from the glibc version
> used for linking

This warning also shows up in the build which works (eglibc 2.18)

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit doesn't start with glibc 2.19 because geteuid() fails
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
                   ` (3 preceding siblings ...)
  2014-09-04 12:27 ` bugzilla at busybox.net
@ 2014-09-04 15:52 ` bugzilla at busybox.net
  2014-09-05  8:43 ` bugzilla at busybox.net
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-04 15:52 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

--- Comment #5 from Yann E. MORIN <yann.morin.1998@free.fr> 2014-09-04 15:52:07 UTC ---
> It's the configuration of 2014.08 no changes by me.

Sorry, this does not make sense:
  - there is no default configuration in Buildroot;
  - the default C library is uClibc, not glibc/eglibc.

So, yes, you did some configuration.
Please provide your .config file.

Regards,
Yann E. MORIN.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit doesn't start with glibc 2.19 because geteuid() fails
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
                   ` (4 preceding siblings ...)
  2014-09-04 15:52 ` bugzilla at busybox.net
@ 2014-09-05  8:43 ` bugzilla at busybox.net
  2014-09-05  8:44 ` bugzilla at busybox.net
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-05  8:43 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

--- Comment #6 from syntheticpp at gmx.net 2014-09-05 08:43:42 UTC ---
Created attachment 5588
  --> https://bugs.busybox.net/attachment.cgi?id=5588
defconfig

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit doesn't start with glibc 2.19 because geteuid() fails
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
                   ` (5 preceding siblings ...)
  2014-09-05  8:43 ` bugzilla at busybox.net
@ 2014-09-05  8:44 ` bugzilla at busybox.net
  2014-09-05 10:26 ` bugzilla at busybox.net
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-05  8:44 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

--- Comment #7 from syntheticpp at gmx.net 2014-09-05 08:44:35 UTC ---
Created attachment 5594
  --> https://bugs.busybox.net/attachment.cgi?id=5594
generated .config

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit doesn't start with glibc 2.19 because geteuid() fails
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
                   ` (6 preceding siblings ...)
  2014-09-05  8:44 ` bugzilla at busybox.net
@ 2014-09-05 10:26 ` bugzilla at busybox.net
  2014-09-05 10:27 ` [Buildroot] [Bug 7364] monit builds a static application, even though BR2_PREFER_STATIC_LIB is not set, and with glibc bugzilla at busybox.net
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-05 10:26 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

--- Comment #8 from Yann E. MORIN <yann.morin.1998@free.fr> 2014-09-05 10:26:22 UTC ---
Indeed, the build warns about the use os the NSS functions in statically linked
applications.

However, this is only a warning, and not a build failure.

monit should not build a static application to start with. Changing the subject
to reflect the real issue.

Regards,
Yann E. MORIN.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit builds a static application, even though BR2_PREFER_STATIC_LIB is not set, and with glibc.
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
                   ` (7 preceding siblings ...)
  2014-09-05 10:26 ` bugzilla at busybox.net
@ 2014-09-05 10:27 ` bugzilla at busybox.net
  2014-09-05 10:30 ` bugzilla at busybox.net
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-05 10:27 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

Yann E. MORIN <yann.morin.1998@free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|monit doesn't start with    |monit builds a static
                   |glibc 2.19 because          |application, even though
                   |geteuid() fails             |BR2_PREFER_STATIC_LIB is
                   |                            |not set, and with glibc.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit builds a static application, even though BR2_PREFER_STATIC_LIB is not set, and with glibc.
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
                   ` (8 preceding siblings ...)
  2014-09-05 10:27 ` [Buildroot] [Bug 7364] monit builds a static application, even though BR2_PREFER_STATIC_LIB is not set, and with glibc bugzilla at busybox.net
@ 2014-09-05 10:30 ` bugzilla at busybox.net
  2014-09-05 11:18 ` bugzilla at busybox.net
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-05 10:30 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

--- Comment #9 from Yann E. MORIN <yann.morin.1998@free.fr> 2014-09-05 10:30:26 UTC ---
When the C library is glibc/eglibc, we copy those files to the target:
    LIB_EXTERNAL_LIBS+=libnss_files.so.* libnss_dns.so.*

Can you confirm those files are present in your target?

Regarding the delay to login: what is your authentication method? Maybe there
are a few other libnss files tht should be copied over...

Regards,
Yann E. MORIN.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit builds a static application, even though BR2_PREFER_STATIC_LIB is not set, and with glibc.
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
                   ` (9 preceding siblings ...)
  2014-09-05 10:30 ` bugzilla at busybox.net
@ 2014-09-05 11:18 ` bugzilla at busybox.net
  2014-09-05 12:38 ` bugzilla at busybox.net
  2014-09-06 21:48 ` bugzilla at busybox.net
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-05 11:18 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

--- Comment #10 from Yann E. MORIN <yann.morin.1998@free.fr> 2014-09-05 11:18:45 UTC ---
I have a patch I'm currently testing...

Regards,
Yann E. MORIN.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit builds a static application, even though BR2_PREFER_STATIC_LIB is not set, and with glibc.
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
                   ` (10 preceding siblings ...)
  2014-09-05 11:18 ` bugzilla at busybox.net
@ 2014-09-05 12:38 ` bugzilla at busybox.net
  2014-09-06 21:48 ` bugzilla at busybox.net
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-05 12:38 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

--- Comment #11 from syntheticpp at gmx.net 2014-09-05 12:38:10 UTC ---
(In reply to comment #9)
> When the C library is glibc/eglibc, we copy those files to the target:
>     LIB_EXTERNAL_LIBS+=libnss_files.so.* libnss_dns.so.*
> 
> Can you confirm those files are present in your target?

Yes, they are.

> 
> Regarding the delay to login: what is your authentication method? Maybe there
> are a few other libnss files tht should be copied over...

In meantime I saw it also with the other build, so not related to this bug
here.

> 
> Regards,
> Yann E. MORIN.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [Bug 7364] monit builds a static application, even though BR2_PREFER_STATIC_LIB is not set, and with glibc.
  2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
                   ` (11 preceding siblings ...)
  2014-09-05 12:38 ` bugzilla at busybox.net
@ 2014-09-06 21:48 ` bugzilla at busybox.net
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla at busybox.net @ 2014-09-06 21:48 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=7364

Yann E. MORIN <yann.morin.1998@free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #12 from Yann E. MORIN <yann.morin.1998@free.fr> 2014-09-06 21:48:40 UTC ---
Hello!

We believe this isuue has now been fixed with this changeset:
   
http://git.buildroot.org/buildroot/commit/?id=03f388619a4dfa2835774702a54504b56e2e00e0

I'm closing the issue now. If you believe this does not fix your
problem, be sure to re-open this issue for further investigations.

Thank you for the report! :-)

Regards,
Yann E. MORIN.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-09-06 21:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-03 17:09 [Buildroot] [Bug 7364] New: monit doesn't start with glibc 2.19 because geteuid() fails bugzilla at busybox.net
2014-09-03 18:02 ` [Buildroot] [Bug 7364] " bugzilla at busybox.net
2014-09-03 18:57 ` bugzilla at busybox.net
2014-09-04 12:22 ` bugzilla at busybox.net
2014-09-04 12:27 ` bugzilla at busybox.net
2014-09-04 15:52 ` bugzilla at busybox.net
2014-09-05  8:43 ` bugzilla at busybox.net
2014-09-05  8:44 ` bugzilla at busybox.net
2014-09-05 10:26 ` bugzilla at busybox.net
2014-09-05 10:27 ` [Buildroot] [Bug 7364] monit builds a static application, even though BR2_PREFER_STATIC_LIB is not set, and with glibc bugzilla at busybox.net
2014-09-05 10:30 ` bugzilla at busybox.net
2014-09-05 11:18 ` bugzilla at busybox.net
2014-09-05 12:38 ` bugzilla at busybox.net
2014-09-06 21:48 ` bugzilla at busybox.net

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.