samba shares access issue in Solaris from a MT program

Richard Sharpe rsharpe at richardsharpe.com
Tue Sep 28 17:36:10 GMT 2004


On Tue, 28 Sep 2004, Narayana Pattipati wrote:

> On Tue, 2004-09-28 at 21:02, David Collier-Brown wrote:
> > ---
> > bin/libsmbclient.so: $(LIBSMBCLIENT_PICOBJS)
> > 	@echo Linking libsmbclient shared library $@
> > 	@$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_PICOBJS) \
> > 		$(LDFLAGS) $(DYNEXP) $(LIBS) \
> >            	$(KRB5LIBS) $(LDAP_LIBS) \
> > 		-h `basename $@`.$(LIBSMBCLIENT_MAJOR)
> >
> > to
> > ---
> > bin/libsmbclient.so: $(LIBSMBCLIENT_PICOBJS)
> > 	@echo Linking libsmbclient shared library $@
> > 	@$(SHLD) $(LDSHFLAGS) -D_REENTRANT \
> > 		-o $@ $(LIBSMBCLIENT_PICOBJS) \
> > 		$(LDFLAGS) $(DYNEXP) $(LIBS) \
> >            	$(KRB5LIBS) $(LDAP_LIBS) -lthread \
> > 		-h `basename $@`.$(LIBSMBCLIENT_MAJOR)
> >
> > ... for Solaris versions up to 9. On Solaris 10, you don't
> > need to add -lthread, as it was folded into the standard
> > c library.
>
> If I not wrong, this change is trying to add -D_REENTRANT flag during
> linking time. This may not work. I tried it with a small test program,
> which did not work. I guess we need to use this flag during compilation
> time.

Yes, this is adding -D_REENTRANT during linking ... I would think that I
need to tell the compiler to generate re-entrant code as well, but I don't
do much on Solaris.

Regards
-----
Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org,
sharpe[at]ethereal.com, http://www.richardsharpe.com


More information about the samba-technical mailing list