summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-01-29 00:23:40 +0000
committerJeremy Allison <jra@samba.org>2000-01-29 00:23:40 +0000
commit21df01ff7d8f520aa5de2b737bd84ba2460d76b8 (patch)
treeff3d9b059293d5e9f7d2f9cfb7366415b54e7536 /source3
parentebfef23a7d255c68785bff4682117e09957bc23e (diff)
downloadsamba-21df01ff7d8f520aa5de2b737bd84ba2460d76b8.tar.gz
samba-21df01ff7d8f520aa5de2b737bd84ba2460d76b8.tar.bz2
samba-21df01ff7d8f520aa5de2b737bd84ba2460d76b8.zip
Wrapped popen calls in HAVE_POPEN - needed if we are to add the
env patch. Jeremy. (This used to be commit 94c075faee88538e48d1898f1694500b8a5d4c8b)
Diffstat (limited to 'source3')
-rwxr-xr-xsource3/configure2
-rw-r--r--source3/configure.in2
-rw-r--r--source3/include/config.h.in3
-rw-r--r--source3/printing/print_svid.c4
-rw-r--r--source3/smbd/dfree.c2
5 files changed, 11 insertions, 2 deletions
diff --git a/source3/configure b/source3/configure
index 97366dbdef..fd6902bf2e 100755
--- a/source3/configure
+++ b/source3/configure
@@ -4203,7 +4203,7 @@ else
fi
done
-for ac_func in initgroups select rdchk getgrnam getgrent pathconf
+for ac_func in initgroups select rdchk getgrnam getgrent pathconf popen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4210: checking for $ac_func" >&5
diff --git a/source3/configure.in b/source3/configure.in
index d3e87c516e..4f78de7df7 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -352,7 +352,7 @@ AC_CHECK_FUNCS(waitpid getcwd strdup strtoul strerror chown chmod chroot)
AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset)
AC_CHECK_FUNCS(memmove vsnprintf snprintf setsid glob strpbrk pipe crypt16 getauthuid)
AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent)
-AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf)
+AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf popen)
AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups mktime rename ftruncate stat64 fstat64)
AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64)
AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid yp_get_default_domain getpwanam)
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
index 732798ac24..49344a05c8 100644
--- a/source3/include/config.h.in
+++ b/source3/include/config.h.in
@@ -547,6 +547,9 @@
/* Define if you have the pipe function. */
#undef HAVE_PIPE
+/* Define if you have the popen function. */
+#undef HAVE_POPEN
+
/* Define if you have the pread function. */
#undef HAVE_PREAD
diff --git a/source3/printing/print_svid.c b/source3/printing/print_svid.c
index 85eaf8f95d..ffc059f9f9 100644
--- a/source3/printing/print_svid.c
+++ b/source3/printing/print_svid.c
@@ -47,6 +47,7 @@ static printer_t *printers = NULL;
static void populate_printers(void)
{
+#ifdef HAVE_POPEN
FILE *fp;
if ((fp = popen("/usr/bin/lpstat -v", "r")) != NULL) {
@@ -91,6 +92,9 @@ static void populate_printers(void)
} else {
DEBUG(0,( "Unable to run lpstat!\n"));
}
+#else
+ DEBUG(0,( "No popen() defined: Unable to run lpstat!\n"));
+#endif
}
diff --git a/source3/smbd/dfree.c b/source3/smbd/dfree.c
index bd06d3f235..7838080461 100644
--- a/source3/smbd/dfree.c
+++ b/source3/smbd/dfree.c
@@ -208,6 +208,7 @@ static SMB_BIG_UINT disk_free(char *path, BOOL small_query,
* If external disk calculation specified, use it.
*/
+#ifdef HAVE_POPEN
dfree_command = lp_dfree_command();
if (dfree_command && *dfree_command) {
pstring line;
@@ -249,6 +250,7 @@ static SMB_BIG_UINT disk_free(char *path, BOOL small_query,
fsusage(path, dfree, dsize);
}
} else
+#endif /* HAVE_POPEN */
fsusage(path, dfree, dsize);
if (disk_quotas(path, &bsize_q, &dfree_q, &dsize_q)) {