Re: PAM authentication patch - v2

Brian Murphy <[email protected]>
Newsgroups gmane.comp.version-control.cvs.bugs
Message-ID <[email protected]>
Derek Robert Price wrote:

>>
> Hrm.  Can we get $PROG (see src/sanity.sh) in here?  This is the 
> program prefix defined by configure + the string `cvs'.  This is the 
> actual name of the CVS executable since the user can set it at 
> configure time.  It shouldn't be hard to use AC_DEFINE_UNQUOTED to 
> define PAM_SERVICENAME to the correct string once you figure which 
> shell variable configure is storing the value in.
>

src/sanity.sh seems to get called with the name "cvs"

brm@brian:~/cvs/cvs/src$ grep sanity.sh Makefile
        sanity.sh
        $(SHELL) $(srcdir)/sanity.sh `pwd`/cvs
        $(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs

the prefix (name mangling) specified at configuration time is only 
carried out
when we install with this lovely bit of code:

install-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(bindir)
        @list='$(bin_PROGRAMS)'; for p in $$list; do \
          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          if test -f $$p \
          ; then \
            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
           echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p 
$(DESTDIR)$(bindir)/$$f"; \
           $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p 
$(DESTDIR)$(bindir)/$$f; \
          else :; fi; \
         done

I especially like the bit with sed. This means that at the moment there 
is no variable
which contains the name of the executable as it will be when installed.

/Brian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.