Reducing the size of smbpasswd in 3.2.4

Uri Simchoni uri_simchoni at hotmail.com
Wed Oct 15 15:56:26 GMT 2008


Hi,
 
I've been trying to reduce the size of the smbpasswd (and pdedit) utility, figuring that most of the code is probably common with smbd and can be in shared libraries.
At this stage I'm trying to do it without code modifications, and with very limited success:
- smbpasswd on my system is around 3MBytes (X86, no ldap). The configure parameters are shown below.
- I started with "smbd -b" and adding all "builtin modules" to the "--with-shared-modules=" list.
 
- The only modules I managed to extract this way were the pdb modules and the auth modules. Trying to "modulize" the rpc modules produced link errors in smbd. For example, adding rpc_winreg produced the link error:
 
rpc_server/srv_pipe.o: In function `.L9':srv_pipe.c:(.text+0xc9): undefined reference to `winreg_get_pipe_fns'
- Furthermore, I couldn't figure out how to put all the configuration code (smb.conf, registry reading) in a shared library. Is it possible?
 
Any comments/advice on this issue will be appreciated.
Uri.
 
 
The configure script runs as:
    cd ${PKG_DIR} ; ${SAMBA_SRCDIR}/configure --prefix=/usr --host=${CONFIG_HOST} \    CFLAGS="${CFLAGS}" \    CPPFLAGS="${CPPFLAGS} -DMAX_DEBUG_LEVEL=2" \    LDFLAGS="${LDFLAGS}" \    ${SAMBA_CROSS_FLAGS} \  --disable-debug \  --disable-developer \  --disable-krb5developer \  --enable-largefile \  --disable-socket-wrapper \  --disable-nss-wrapper \  --disable-swat \  --disable-dmalloc \  --disable-cups \  --disable-iprint \  --disable-static \  --enable-shared \  --disable-fam \  --enable-shared-libs \  --disable-dnssd \  --without-fhs \  --without-ctdb \  --without-profiling-data \  --without-readline \  --with-libiconv \  --without-afs \  --without-fake-kaserver \  --without-vfs-afsacl \  --without-dce-dfs \  --without-ldap \  --without-ads \  --without-krb5 \  --without-dnsupdate \  --without-automount \  --with-cifsmount \  --without-cifsspnego \  --without-pam \  --without-pam_smbpass \  --without-nisplus-home \  --without-syslog \  --without-quotas \  --without-sys-quotas \  --without-utmp \  --with-libtalloc \  --with-libtdb \  --with-libnetapi \  --with-libaddns \  --with-libsmbclient \  --with-libsmbsharemodes \  --without-cluster-support \  --with-acl-support \  --without-aio-support \  --with-sendfile-support \  --without-winbind \  --with-included-popt \  --without-included-iniparser
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx


More information about the samba-technical mailing list