Message ID | 54EF320A.90409@redhat.com |
---|---|
State | Committed |
Headers |
Received: (qmail 88677 invoked by alias); 26 Feb 2015 14:47:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 88668 invoked by uid 89); 26 Feb 2015 14:47:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Message-ID: <54EF320A.90409@redhat.com> Date: Thu, 26 Feb 2015 15:47:38 +0100 From: Florian Weimer <fweimer@redhat.com> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: GNU C Library <libc-alpha@sourceware.org> Subject: [PATCH] _nss_nis_initgroups_dyn: Return error status Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit |
Commit Message
Florian Weimer
Feb. 26, 2015, 2:47 p.m. UTC
This seems to have been an oversight. An error can be returned if the function is left with “goto done;”. 2015-02-26 Florian Weimer <fweimer@redhat.com> * nis/nss_nis/nis-initgroups.c (_nss_nis_initgroups_dyn): Return error status.
Comments
On 26 Feb 2015 15:47, Florian Weimer wrote: > This seems to have been an oversight. An error can be returned if the > function is left with “goto done;”. lgtm -mike
Florian Weimer <fweimer@redhat.com> writes: > This seems to have been an oversight. An error can be returned if the > function is left with “goto done;”. > > 2015-02-26 Florian Weimer <fweimer@redhat.com> > > * nis/nss_nis/nis-initgroups.c (_nss_nis_initgroups_dyn): > Return error status. > > diff --git a/nis/nss_nis/nis-initgroups.c b/nis/nss_nis/nis-initgroups.c > index d22b241..ed5c26b 100644 > --- a/nis/nss_nis/nis-initgroups.c > +++ b/nis/nss_nis/nis-initgroups.c > @@ -326,5 +326,5 @@ done: > free (intern.next); > } > > - return NSS_STATUS_SUCCESS; > + return status; > } This causes _nss_nis_initgroups_dyn to always return NSS_STATUS_NOTFOUND. Andreas.
On 06/16/2016 11:31 AM, Andreas Schwab wrote: > Florian Weimer <fweimer@redhat.com> writes: > >> This seems to have been an oversight. An error can be returned if the >> function is left with “goto done;”. >> >> 2015-02-26 Florian Weimer <fweimer@redhat.com> >> >> * nis/nss_nis/nis-initgroups.c (_nss_nis_initgroups_dyn): >> Return error status. >> >> diff --git a/nis/nss_nis/nis-initgroups.c b/nis/nss_nis/nis-initgroups.c >> index d22b241..ed5c26b 100644 >> --- a/nis/nss_nis/nis-initgroups.c >> +++ b/nis/nss_nis/nis-initgroups.c >> @@ -326,5 +326,5 @@ done: >> free (intern.next); >> } >> >> - return NSS_STATUS_SUCCESS; >> + return status; >> } > > This causes _nss_nis_initgroups_dyn to always return > NSS_STATUS_NOTFOUND. What is the expectation behavior of this function? Always return NSS_STATUS_NOTFOUND, even in case of an error? Thanks, Florian
Florian Weimer <fweimer@redhat.com> writes:
> What is the expectation behavior of this function?
Return NSS_STATUS_SUCCESS when done.
Andreas.
diff --git a/nis/nss_nis/nis-initgroups.c b/nis/nss_nis/nis-initgroups.c index d22b241..ed5c26b 100644 --- a/nis/nss_nis/nis-initgroups.c +++ b/nis/nss_nis/nis-initgroups.c @@ -326,5 +326,5 @@ done: free (intern.next); } - return NSS_STATUS_SUCCESS; + return status; }