summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/includes.h2
-rw-r--r--source3/lib/dprintf.c4
-rw-r--r--source3/smbd/oplock_linux.c3
-rw-r--r--source3/smbd/reply.c1
-rw-r--r--source3/utils/nmblookup.c52
-rw-r--r--source3/utils/status.c738
-rw-r--r--source3/web/swat.c330
7 files changed, 566 insertions, 564 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index b29759540f..98580c3626 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -1009,6 +1009,8 @@ extern int DEBUGLEVEL;
/* add varargs prototypes with printf checking */
int fdprintf(int , char *, ...) PRINTF_ATTRIBUTE(2,3);
+int d_printf(char *, ...) PRINTF_ATTRIBUTE(1,2);
+int d_fprintf(FILE *f, char *, ...) PRINTF_ATTRIBUTE(2,3);
#ifndef HAVE_SNPRINTF_DECL
int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);
#endif
diff --git a/source3/lib/dprintf.c b/source3/lib/dprintf.c
index 59e1859c43..157ce6b716 100644
--- a/source3/lib/dprintf.c
+++ b/source3/lib/dprintf.c
@@ -68,7 +68,7 @@ again:
}
-int d_fprintf(FILE *f, const char *format, ...)
+ int d_fprintf(FILE *f, const char *format, ...)
{
int ret;
va_list ap;
@@ -82,7 +82,7 @@ int d_fprintf(FILE *f, const char *format, ...)
static FILE *outfile;
-int d_printf(const char *format, ...)
+ int d_printf(const char *format, ...)
{
int ret;
va_list ap;
diff --git a/source3/smbd/oplock_linux.c b/source3/smbd/oplock_linux.c
index 39ee3eb86b..c88441c8c6 100644
--- a/source3/smbd/oplock_linux.c
+++ b/source3/smbd/oplock_linux.c
@@ -62,7 +62,8 @@ static void signal_handler(int sig, siginfo_t *info, void *unused)
/****************************************************************************
try to gain a linux capability
-****************************************************************************/static void set_capability(unsigned capability)
+****************************************************************************/
+static void set_capability(unsigned capability)
{
#ifndef _LINUX_CAPABILITY_VERSION
#define _LINUX_CAPABILITY_VERSION 0x19980330
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 0d1d5eed7c..c2d38a1076 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -4045,7 +4045,6 @@ SMB_BIG_UINT get_lock_count( char *data, int data_offset, BOOL large_file_format
/****************************************************************************
Pathetically try and map a 64 bit lock offset into 31 bits. I hate Windows :-).
****************************************************************************/
-
static uint32 map_lock_offset(uint32 high, uint32 low)
{
unsigned int i;
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c
index 5acdf62735..2d86cc0a35 100644
--- a/source3/utils/nmblookup.c
+++ b/source3/utils/nmblookup.c
@@ -62,22 +62,22 @@ usage on the program
****************************************************************************/
static void usage(void)
{
- printf("Usage: nmblookup [-M] [-B bcast address] [-d debuglevel] name\n");
- printf("Version %s\n",VERSION);
- printf("\t-d debuglevel set the debuglevel\n");
- printf("\t-B broadcast address the address to use for broadcasts\n");
- printf("\t-U unicast address the address to use for unicast\n");
- printf("\t-M searches for a master browser\n");
- printf("\t-R set recursion desired in packet\n");
- printf("\t-S lookup node status as well\n");
- printf("\t-T translate IP addresses into names\n");
- printf("\t-r Use root port 137 (Win95 only replies to this)\n");
- printf("\t-A Do a node status on <name> as an IP Address\n");
- printf("\t-i NetBIOS scope Use the given NetBIOS scope for name queries\n");
- printf("\t-s smb.conf file Use the given path to the smb.conf file\n");
- printf("\t-h Print this help message.\n");
- printf("\n If you specify -M and name is \"-\", nmblookup looks up __MSBROWSE__<01>\n");
- printf("\n");
+ d_printf("Usage: nmblookup [-M] [-B bcast address] [-d debuglevel] name\n");
+ d_printf("Version %s\n",VERSION);
+ d_printf("\t-d debuglevel set the debuglevel\n");
+ d_printf("\t-B broadcast address the address to use for broadcasts\n");
+ d_printf("\t-U unicast address the address to use for unicast\n");
+ d_printf("\t-M searches for a master browser\n");
+ d_printf("\t-R set recursion desired in packet\n");
+ d_printf("\t-S lookup node status as well\n");
+ d_printf("\t-T translate IP addresses into names\n");
+ d_printf("\t-r Use root port 137 (Win95 only replies to this)\n");
+ d_printf("\t-A Do a node status on <name> as an IP Address\n");
+ d_printf("\t-i NetBIOS scope Use the given NetBIOS scope for name queries\n");
+ d_printf("\t-s smb.conf file Use the given path to the smb.conf file\n");
+ d_printf("\t-h Print this help message.\n");
+ d_printf("\n If you specify -M and name is \"-\", nmblookup looks up __MSBROWSE__<01>\n");
+ d_printf("\n");
}
/****************************************************************************
@@ -111,7 +111,7 @@ static void do_node_status(int fd, char *name, int type, struct in_addr ip)
struct node_status *status;
fstring cleanname;
- printf("Looking up status of %s\n",inet_ntoa(ip));
+ d_printf("Looking up status of %s\n",inet_ntoa(ip));
make_nmb_name(&nname, name, type);
status = node_status_query(fd,&nname,ip, &count);
if (status) {
@@ -120,13 +120,13 @@ static void do_node_status(int fd, char *name, int type, struct in_addr ip)
for (j=0;cleanname[j];j++) {
if (!isprint((int)cleanname[j])) cleanname[j] = '.';
}
- printf("\t%-15s <%02x> - %s\n",
+ d_printf("\t%-15s <%02x> - %s\n",
cleanname,status[i].type,
node_status_flags(status[i].flags));
}
free(status);
}
- printf("\n");
+ d_printf("\n");
}
@@ -139,7 +139,7 @@ static BOOL query_one(char *lookup, unsigned int lookup_type)
struct in_addr *ip_list=NULL;
if (got_bcast) {
- printf("querying %s on %s\n", lookup, inet_ntoa(bcast_addr));
+ d_printf("querying %s on %s\n", lookup, inet_ntoa(bcast_addr));
ip_list = name_query(ServerFD,lookup,lookup_type,use_bcast,
use_bcast?True:recursion_desired,
bcast_addr,&count);
@@ -149,7 +149,7 @@ static BOOL query_one(char *lookup, unsigned int lookup_type)
!ip_list && j >= 0;
j--) {
bcast = iface_n_bcast(j);
- printf("querying %s on %s\n",
+ d_printf("querying %s on %s\n",
lookup, inet_ntoa(*bcast));
ip_list = name_query(ServerFD,lookup,lookup_type,
use_bcast,
@@ -164,10 +164,10 @@ static BOOL query_one(char *lookup, unsigned int lookup_type)
if (translate_addresses) {
struct hostent *host = gethostbyaddr((char *)&ip_list[j], sizeof(ip_list[j]), AF_INET);
if (host) {
- printf("%s, ", host -> h_name);
+ d_printf("%s, ", host -> h_name);
}
}
- printf("%s %s<%02x>\n",inet_ntoa(ip_list[j]),lookup, lookup_type);
+ d_printf("%s %s<%02x>\n",inet_ntoa(ip_list[j]),lookup, lookup_type);
}
/* We can only do find_status if the ip address returned
@@ -310,10 +310,10 @@ int main(int argc,char *argv[])
}
if (!query_one(lookup, lookup_type)) {
- printf( "name_query failed to find name %s", lookup );
+ d_printf( "name_query failed to find name %s", lookup );
if( 0 != lookup_type )
- printf( "#%02x", lookup_type );
- printf( "\n" );
+ d_printf( "#%02x", lookup_type );
+ d_printf( "\n" );
}
}
diff --git a/source3/utils/status.c b/source3/utils/status.c
index 27c6d9b51b..91eca9f88f 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -91,42 +91,42 @@ static void print_share_mode(share_mode_entry *e, char *fname)
{
static int count;
if (count==0) {
- printf("Locked files:\n");
- printf("Pid DenyMode R/W Oplock Name\n");
- printf("--------------------------------------------------\n");
+ d_printf("Locked files:\n");
+ d_printf("Pid DenyMode R/W Oplock Name\n");
+ d_printf("--------------------------------------------------\n");
}
count++;
if (Ucrit_checkPid(e->pid)) {
- printf("%-5d ",(int)e->pid);
+ d_printf("%-5d ",(int)e->pid);
switch (GET_DENY_MODE(e->share_mode)) {
- case DENY_NONE: printf("DENY_NONE "); break;
- case DENY_ALL: printf("DENY_ALL "); break;
- case DENY_DOS: printf("DENY_DOS "); break;
- case DENY_READ: printf("DENY_READ "); break;
+ case DENY_NONE: d_printf("DENY_NONE "); break;
+ case DENY_ALL: d_printf("DENY_ALL "); break;
+ case DENY_DOS: d_printf("DENY_DOS "); break;
+ case DENY_READ: d_printf("DENY_READ "); break;
case DENY_WRITE:printf("DENY_WRITE "); break;
- case DENY_FCB: printf("DENY_FCB "); break;
+ case DENY_FCB: d_printf("DENY_FCB "); break;
}
switch (e->share_mode&0xF) {
- case 0: printf("RDONLY "); break;
- case 1: printf("WRONLY "); break;
- case 2: printf("RDWR "); break;
+ case 0: d_printf("RDONLY "); break;
+ case 1: d_printf("WRONLY "); break;
+ case 2: d_printf("RDWR "); break;
}
if((e->op_type &
(EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) ==
(EXCLUSIVE_OPLOCK|BATCH_OPLOCK))
- printf("EXCLUSIVE+BATCH ");
+ d_printf("EXCLUSIVE+BATCH ");
else if (e->op_type & EXCLUSIVE_OPLOCK)
- printf("EXCLUSIVE ");
+ d_printf("EXCLUSIVE ");
else if (e->op_type & BATCH_OPLOCK)
- printf("BATCH ");
+ d_printf("BATCH ");
else if (e->op_type & LEVEL_II_OPLOCK)
- printf("LEVEL_II ");
+ d_printf("LEVEL_II ");
else
- printf("NONE ");
+ d_printf("NONE ");
- printf(" %s %s",fname,
+ d_printf(" %s %s",fname,
asctime(LocalTime((time_t *)&e->time.tv_sec)));
}
}
@@ -137,13 +137,13 @@ static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, int pid,
{
static int count;
if (count==0) {
- printf("Byte range locks:\n");
- printf(" Pid dev:inode R/W start size\n");
- printf("------------------------------------------------\n");
+ d_printf("Byte range locks:\n");
+ d_printf(" Pid dev:inode R/W start size\n");
+ d_printf("------------------------------------------------\n");
}
count++;
- printf("%6d %05x:%05x %s %9.0f %9.0f\n",
+ d_printf("%6d %05x:%05x %s %9.0f %9.0f\n",
(int)pid, (int)dev, (int)ino,
lock_type==READ_LOCK?"R":"W",
(double)start, (double)size);
@@ -160,337 +160,337 @@ static int profile_dump(void)
return -1;
}
- printf("smb_count: %u\n", profile_p->smb_count);
- printf("uid_changes: %u\n", profile_p->uid_changes);
- printf("************************ System Calls ****************************\n");
- printf("opendir_count: %u\n", profile_p->syscall_opendir_count);
- printf("opendir_time: %u\n", profile_p->syscall_opendir_time);
- printf("readdir_count: %u\n", profile_p->syscall_readdir_count);
- printf("readdir_time: %u\n", profile_p->syscall_readdir_time);
- printf("mkdir_count: %u\n", profile_p->syscall_mkdir_count);
- printf("mkdir_time: %u\n", profile_p->syscall_mkdir_time);
- printf("rmdir_count: %u\n", profile_p->syscall_rmdir_count);
- printf("rmdir_time: %u\n", profile_p->syscall_rmdir_time);
- printf("closedir_count: %u\n", profile_p->syscall_closedir_count);
- printf("closedir_time: %u\n", profile_p->syscall_closedir_time);
- printf("open_count: %u\n", profile_p->syscall_open_count);
- printf("open_time: %u\n", profile_p->syscall_open_time);
- printf("close_count: %u\n", profile_p->syscall_close_count);
- printf("close_time: %u\n", profile_p->syscall_close_time);
- printf("read_count: %u\n", profile_p->syscall_read_count);
- printf("read_time: %u\n", profile_p->syscall_read_time);
- printf("read_bytes: %u\n", profile_p->syscall_read_bytes);
- printf("write_count: %u\n", profile_p->syscall_write_count);
- printf("write_time: %u\n", profile_p->syscall_write_time);
- printf("write_bytes: %u\n", profile_p->syscall_write_bytes);
- printf("lseek_count: %u\n", profile_p->syscall_lseek_count);
- printf("lseek_time: %u\n", profile_p->syscall_lseek_time);
- printf("rename_count: %u\n", profile_p->syscall_rename_count);
- printf("rename_time: %u\n", profile_p->syscall_rename_time);
- printf("fsync_count: %u\n", profile_p->syscall_fsync_count);
- printf("fsync_time: %u\n", profile_p->syscall_fsync_time);
- printf("stat_count: %u\n", profile_p->syscall_stat_count);
- printf("stat_time: %u\n", profile_p->syscall_stat_time);
- printf("fstat_count: %u\n", profile_p->syscall_fstat_count);
- printf("fstat_time: %u\n", profile_p->syscall_fstat_time);
- printf("lstat_count: %u\n", profile_p->syscall_lstat_count);
- printf("lstat_time: %u\n", profile_p->syscall_lstat_time);
- printf("unlink_count: %u\n", profile_p->syscall_unlink_count);
- printf("unlink_time: %u\n", profile_p->syscall_unlink_time);
- printf("chmod_count: %u\n", profile_p->syscall_chmod_count);
- printf("chmod_time: %u\n", profile_p->syscall_chmod_time);
- printf("fchmod_count: %u\n", profile_p->syscall_fchmod_count);
- printf("fchmod_time: %u\n", profile_p->syscall_fchmod_time);
- printf("chown_count: %u\n", profile_p->syscall_chown_count);
- printf("chown_time: %u\n", profile_p->syscall_chown_time);
- printf("fchown_count: %u\n", profile_p->syscall_fchown_count);
- printf("fchown_time: %u\n", profile_p->syscall_fchown_time);
- printf("chdir_count: %u\n", profile_p->syscall_chdir_count);
- printf("chdir_time: %u\n", profile_p->syscall_chdir_time);
- printf("getwd_count: %u\n", profile_p->syscall_getwd_count);
- printf("getwd_time: %u\n", profile_p->syscall_getwd_time);
- printf("utime_count: %u\n", profile_p->syscall_utime_count);
- printf("utime_time: %u\n", profile_p->syscall_utime_time);
- printf("ftruncate_count: %u\n", profile_p->syscall_ftruncate_count);
- printf("ftruncate_time: %u\n", profile_p->syscall_ftruncate_time);
- printf("fcntl_lock_count: %u\n", profile_p->syscall_fcntl_lock_count);
- printf("fcntl_lock_time: %u\n", profile_p->syscall_fcntl_lock_time);
- printf("readlink_count: %u\n", profile_p->syscall_readlink_count);
- printf("readlink_time: %u\n", profile_p->syscall_readlink_time);
- printf("symlink_count: %u\n", profile_p->syscall_symlink_count);
- printf("symlink_time: %u\n", profile_p->syscall_symlink_time);
- printf("************************ Statcache *******************************\n");
- printf("lookups: %u\n", profile_p->statcache_lookups);
- printf("misses: %u\n", profile_p->statcache_misses);
- printf("hits: %u\n", profile_p->statcache_hits);
- printf("************************ Writecache ******************************\n");
- printf("read_hits: %u\n", profile_p->writecache_read_hits);
- printf("abutted_writes: %u\n", profile_p->writecache_abutted_writes);
- printf("total_writes: %u\n", profile_p->writecache_total_writes);
- printf("non_oplock_writes: %u\n", profile_p->writecache_non_oplock_writes);
- printf("direct_writes: %u\n", profile_p->writecache_direct_writes);
- printf("init_writes: %u\n", profile_p->writecache_init_writes);
- printf("flushed_writes[SEEK]: %u\n", profile_p->writecache_flushed_writes[SEEK_FLUSH]);
- printf("flushed_writes[READ]: %u\n", profile_p->writecache_flushed_writes[READ_FLUSH]);
- printf("flushed_writes[WRITE]: %u\n", profile_p->writecache_flushed_writes[WRITE_FLUSH]);
- printf("flushed_writes[READRAW]: %u\n", profile_p->writecache_flushed_writes[READRAW_FLUSH]);
- printf("flushed_writes[OPLOCK_RELEASE]: %u\n", profile_p->writecache_flushed_writes[OPLOCK_RELEASE_FLUSH]);
- printf("flushed_writes[CLOSE]: %u\n", profile_p->writecache_flushed_writes[CLOSE_FLUSH]);
- printf("flushed_writes[SYNC]: %u\n", profile_p->writecache_flushed_writes[SYNC_FLUSH]);
- printf("flushed_writes[SIZECHANGE]: %u\n", profile_p->writecache_flushed_writes[SIZECHANGE_FLUSH]);
- printf("num_perfect_writes: %u\n", profile_p->writecache_num_perfect_writes);
- printf("num_write_caches: %u\n", profile_p->writecache_num_write_caches);
- printf("allocated_write_caches: %u\n", profile_p->writecache_allocated_write_caches);
- printf("************************ SMB Calls *******************************\n");
- printf("mkdir_count: %u\n", profile_p->SMBmkdir_count);
- printf("mkdir_time: %u\n", profile_p->SMBmkdir_time);
- printf("rmdir_count: %u\n", profile_p->SMBrmdir_count);
- printf("rmdir_time: %u\n", profile_p->SMBrmdir_time);
- printf("open_count: %u\n", profile_p->SMBopen_count);
- printf("open_time: %u\n", profile_p->SMBopen_time);
- printf("create_count: %u\n", profile_p->SMBcreate_count);
- printf("create_time: %u\n", profile_p->SMBcreate_time);
- printf("close_count: %u\n", profile_p->SMBclose_count);
- printf("close_time: %u\n", profile_p->SMBclose_time);
- printf("flush_count: %u\n", profile_p->SMBflush_count);
- printf("flush_time: %u\n", profile_p->SMBflush_time);
- printf("unlink_count: %u\n", profile_p->SMBunlink_count);
- printf("unlink_time: %u\n", profile_p->SMBunlink_time);
- printf("mv_count: %u\n", profile_p->SMBmv_count);
- printf("mv_time: %u\n", profile_p->SMBmv_time);
- printf("getatr_count: %u\n", profile_p->SMBgetatr_count);
- printf("getatr_time: %u\n", profile_p->SMBgetatr_time);
- printf("setatr_count: %u\n", profile_p->SMBsetatr_count);
- printf("setatr_time: %u\n", profile_p->SMBsetatr_time);
- printf("read_count: %u\n", profile_p->SMBread_count);
- printf("read_time: %u\n", profile_p->SMBread_time);
- printf("write_count: %u\n", profile_p->SMBwrite_count);
- printf("write_time: %u\n", profile_p->SMBwrite_time);
- printf("lock_count: %u\n", profile_p->SMBlock_count);
- printf("lock_time: %u\n", profile_p->SMBlock_time);
- printf("unlock_count: %u\n", profile_p->SMBunlock_count);
- printf("unlock_time: %u\n", profile_p->SMBunlock_time);
- printf("ctemp_count: %u\n", profile_p->SMBctemp_count);
- printf("ctemp_time: %u\n", profile_p->SMBctemp_time);
- printf("mknew_count: %u\n", profile_p->SMBmknew_count);
- printf("mknew_time: %u\n", profile_p->SMBmknew_time);
- printf("chkpth_count: %u\n", profile_p->SMBchkpth_count);
- printf("chkpth_time: %u\n", profile_p->SMBchkpth_time);
- printf("exit_count: %u\n", profile_p->SMBexit_count);
- printf("exit_time: %u\n", profile_p->SMBexit_time);
- printf("lseek_count: %u\n", profile_p->SMBlseek_count);
- printf("lseek_time: %u\n", profile_p->SMBlseek_time);
- printf("lockread_count: %u\n", profile_p->SMBlockread_count);
- printf("lockread_time: %u\n", profile_p->SMBlockread_time);
- printf("writeunlock_count: %u\n", profile_p->SMBwriteunlock_count);
- printf("writeunlock_time: %u\n", profile_p->SMBwriteunlock_time);
- printf("readbraw_count: %u\n", profile_p->SMBreadbraw_count);
- printf("readbraw_time: %u\n", profile_p->SMBreadbraw_time);
- printf("readBmpx_count: %u\n", profile_p->SMBreadBmpx_count);
- printf("readBmpx_time: %u\n", profile_p->SMBreadBmpx_time);
- printf("readBs_count: %u\n", profile_p->SMBreadBs_count);
- printf("readBs_time: %u\n", profile_p->SMBreadBs_time);
- printf("writebraw_count: %u\n", profile_p->SMBwritebraw_count);
- printf("writebraw_time: %u\n", profile_p->SMBwritebraw_time);
- printf("writeBmpx_count: %u\n", profile_p->SMBwriteBmpx_count);
- printf("writeBmpx_time: %u\n", profile_p->SMBwriteBmpx_time);
- printf("writeBs_count: %u\n", profile_p->SMBwriteBs_count);
- printf("writeBs_time: %u\n", profile_p->SMBwriteBs_time);
- printf("writec_count: %u\n", profile_p->SMBwritec_count);
- printf("writec_time: %u\n", profile_p->SMBwritec_time);
- printf("setattrE_count: %u\n", profile_p->SMBsetattrE_count);
- printf("setattrE_time: %u\n", profile_p->SMBsetattrE_time);
- printf("getattrE_count: %u\n", profile_p->SMBgetattrE_count);
- printf("getattrE_time: %u\n", profile_p->SMBgetattrE_time);
- printf("lockingX_count: %u\n", profile_p->SMBlockingX_count);
- printf("lockingX_time: %u\n", profile_p->SMBlockingX_time);
- printf("trans_count: %u\n", profile_p->SMBtrans_count);
- printf("trans_time: %u\n", profile_p->SMBtrans_time);
- printf("transs_count: %u\n", profile_p->SMBtranss_count);
- printf("transs_time: %u\n", profile_p->SMBtranss_time);
- printf("ioctl_count: %u\n", profile_p->SMBioctl_count);
- printf("ioctl_time: %u\n", profile_p->SMBioctl_time);
- printf("ioctls_count: %u\n", profile_p->SMBioctls_count);
- printf("ioctls_time: %u\n", profile_p->SMBioctls_time);
- printf("copy_count: %u\n", profile_p->SMBcopy_count);
- printf("copy_time: %u\n", profile_p->SMBcopy_time);
- printf("move_count: %u\n", profile_p->SMBmove_count);
- printf("move_time: %u\n", profile_p->SMBmove_time);
- printf("echo_count: %u\n", profile_p->SMBecho_count);
- printf("echo_time: %u\n", profile_p->SMBecho_time);
- printf("writeclose_count: %u\n", profile_p->SMBwriteclose_count);
- printf("writeclose_time: %u\n", profile_p->SMBwriteclose_time);
- printf("openX_count: %u\n", profile_p->SMBopenX_count);
- printf("openX_time: %u\n", profile_p->SMBopenX_time);
- printf("readX_count: %u\n", profile_p->SMBreadX_count);
- printf("readX_time: %u\n", profile_p->SMBreadX_time);
- printf("writeX_count: %u\n", profile_p->SMBwriteX_count);
- printf("writeX_time: %u\n", profile_p->SMBwriteX_time);
- printf("trans2_count: %u\n", profile_p->SMBtrans2_count);
- printf("trans2_time: %u\n", profile_p->SMBtrans2_time);
- printf("transs2_count: %u\n", profile_p->SMBtranss2_count);
- printf("transs2_time: %u\n", profile_p->SMBtranss2_time);
- printf("findclose_count: %u\n", profile_p->SMBfindclose_count);
- printf("findclose_time: %u\n", profile_p->SMBfindclose_time);
- printf("findnclose_count: %u\n", profile_p->SMBfindnclose_count);
- printf("findnclose_time: %u\n", profile_p->SMBfindnclose_time);
- printf("tcon_count: %u\n", profile_p->SMBtcon_count);
- printf("tcon_time: %u\n", profile_p->SMBtcon_time);
- printf("tdis_count: %u\n", profile_p->SMBtdis_count);
- printf("tdis_time: %u\n", profile_p->SMBtdis_time);
- printf("negprot_count: %u\n", profile_p->SMBnegprot_count);
- printf("negprot_time: %u\n", profile_p->SMBnegprot_time);
- printf("sesssetupX_count: %u\n", profile_p->SMBsesssetupX_count);
- printf("sesssetupX_time: %u\n", profile_p->SMBsesssetupX_time);
- printf("ulogoffX_count: %u\n", profile_p->SMBulogoffX_count);
- printf("ulogoffX_time: %u\n", profile_p->SMBulogoffX_time);
- printf("tconX_count: %u\n", profile_p->SMBtconX_count);
- printf("tconX_time: %u\n", profile_p->SMBtconX_time);
- printf("dskattr_count: %u\n", profile_p->SMBdskattr_count);
- printf("dskattr_time: %u\n", profile_p->SMBdskattr_time);
- printf("search_count: %u\n", profile_p->SMBsearch_count);
- printf("search_time: %u\n", profile_p->SMBsearch_time);
- printf("ffirst_count: %u\n", profile_p->SMBffirst_count);
- printf("ffirst_time: %u\n", profile_p->SMBffirst_time);
- printf("funique_count: %u\n", profile_p->SMBfunique_count);
- printf("funique_time: %u\n", profile_p->SMBfunique_time);
- printf("fclose_count: %u\n", profile_p->SMBfclose_count);
- printf("fclose_time: %u\n", profile_p->SMBfclose_time);
- printf("nttrans_count: %u\n", profile_p->SMBnttrans_count);
- printf("nttrans_time: %u\n", profile_p->SMBnttrans_time);
- printf("nttranss_count: %u\n", profile_p->SMBnttranss_count);
- printf("nttranss_time: %u\n", profile_p->SMBnttranss_time);
- printf("ntcreateX_count: %u\n", profile_p->SMBntcreateX_count);
- printf("ntcreateX_time: %u\n", profile_p->SMBntcreateX_time);
- printf("ntcancel_count: %u\n", profile_p->SMBntcancel_count);
- printf("ntcancel_time: %u\n", profile_p->SMBntcancel_time);
- printf("splopen_count: %u\n", profile_p->SMBsplopen_count);
- printf("splopen_time: %u\n", profile_p->SMBsplopen_time);
- printf("splwr_count: %u\n", profile_p->SMBsplwr_count);
- printf("splwr_time: %u\n", profile_p->SMBsplwr_time);
- printf("splclose_count: %u\n", profile_p->SMBsplclose_count);
- printf("splclose_time: %u\n", profile_p->SMBsplclose_time);
- printf("splretq_count: %u\n", profile_p->SMBsplretq_count);
- printf("splretq_time: %u\n", profile_p->SMBsplretq_time);
- printf("sends_count: %u\n", profile_p->SMBsends_count);
- printf("sends_time: %u\n", profile_p->SMBsends_time);
- printf("sendb_count: %u\n", profile_p->SMBsendb_count);
- printf("sendb_time: %u\n", profile_p->SMBsendb_time);
- printf("fwdname_count: %u\n", profile_p->SMBfwdname_count);
- printf("fwdname_time: %u\n", profile_p->SMBfwdname_time);
- printf("cancelf_count: %u\n", profile_p->SMBcancelf_count);
- printf("cancelf_time: %u\n", profile_p->SMBcancelf_time);
- printf("getmac_count: %u\n", profile_p->SMBgetmac_count);
- printf("getmac_time: %u\n", profile_p->SMBgetmac_time);
- printf("sendstrt_count: %u\n", profile_p->SMBsendstrt_count);
- printf("sendstrt_time: %u\n", profile_p->SMBsendstrt_time);
- printf("sendend_count: %u\n", profile_p->SMBsendend_count);
- printf("sendend_time: %u\n", profile_p->SMBsendend_time);
- printf("sendtxt_count: %u\n", profile_p->SMBsendtxt_count);
- printf("sendtxt_time: %u\n", profile_p->SMBsendtxt_time);
- printf("invalid_count: %u\n", profile_p->SMBinvalid_count);
- printf("invalid_time: %u\n", profile_p->SMBinvalid_time);
- printf("************************ Pathworks Calls *************************\n");
- printf("setdir_count: %u\n", profile_p->pathworks_setdir_count);
- printf("setdir_time: %u\n", profile_p->pathworks_setdir_time);
- printf("************************ Trans2 Calls ****************************\n");
- printf("open_count: %u\n", profile_p->Trans2_open_count);
- printf("open_time: %u\n", profile_p->Trans2_open_time);
- printf("findfirst_count: %u\n", profile_p->Trans2_findfirst_count);
- printf("findfirst_time: %u\n", profile_p->Trans2_findfirst_time);
- printf("findnext_count: %u\n", profile_p->Trans2_findnext_count);
- printf("findnext_time: %u\n", profile_p->Trans2_findnext_time);
- printf("qfsinfo_count: %u\n", profile_p->Trans2_qfsinfo_count);
- printf("qfsinfo_time: %u\n", profile_p->Trans2_qfsinfo_time);
- printf("setfsinfo_count: %u\n", profile_p->Trans2_setfsinfo_count);
- printf("setfsinfo_time: %u\n", profile_p->Trans2_setfsinfo_time);
- printf("qpathinfo_count: %u\n", profile_p->Trans2_qpathinfo_count);
- printf("qpathinfo_time: %u\n", profile_p->Trans2_qpathinfo_time);
- printf("setpathinfo_count: %u\n", profile_p->Trans2_setpathinfo_count);
- printf("setpathinfo_time: %u\n", profile_p->Trans2_setpathinfo_time);
- printf("qfileinfo_count: %u\n", profile_p->Trans2_qfileinfo_count);
- printf("qfileinfo_time: %u\n", profile_p->Trans2_qfileinfo_time);
- printf("setfileinfo_count: %u\n", profile_p->Trans2_setfileinfo_count);
- printf("setfileinfo_time: %u\n", profile_p->Trans2_setfileinfo_time);
- printf("fsctl_count: %u\n", profile_p->Trans2_fsctl_count);
- printf("fsctl_time: %u\n", profile_p->Trans2_fsctl_time);
- printf("ioctl_count: %u\n", profile_p->Trans2_ioctl_count);
- printf("ioctl_time: %u\n", profile_p->Trans2_ioctl_time);
- printf("findnotifyfirst_count: %u\n", profile_p->Trans2_findnotifyfirst_count);
- printf("findnotifyfirst_time: %u\n", profile_p->Trans2_findnotifyfirst_time);
- printf("findnotifynext_count: %u\n", profile_p->Trans2_findnotifynext_count);
- printf("findnotifynext_time: %u\n", profile_p->Trans2_findnotifynext_time);
- printf("mkdir_count: %u\n", profile_p->Trans2_mkdir_count);
- printf("mkdir_time: %u\n", profile_p->Trans2_mkdir_time);
- printf("session_setup_count: %u\n", profile_p->Trans2_session_setup_count);
- printf("session_setup_time: %u\n", profile_p->Trans2_session_setup_time);
- printf("get_dfs_referral_count: %u\n", profile_p->Trans2_get_dfs_referral_count);
- printf("get_dfs_referral_time: %u\n", profile_p->Trans2_get_dfs_referral_time);
- printf("report_dfs_inconsistancy_count: %u\n", profile_p->Trans2_report_dfs_inconsistancy_count);
- printf("report_dfs_inconsistancy_time: %u\n", profile_p->Trans2_report_dfs_inconsistancy_time);
- printf("************************ NT Transact Calls ***********************\n");
- printf("create_count: %u\n", profile_p->NT_transact_create_count);
- printf("create_time: %u\n", profile_p->NT_transact_create_time);
- printf("ioctl_count: %u\n", profile_p->NT_transact_ioctl_count);
- printf("ioctl_time: %u\n", profile_p->NT_transact_ioctl_time);
- printf("set_security_desc_count: %u\n", profile_p->NT_transact_set_security_desc_count);
- printf("set_security_desc_time: %u\n", profile_p->NT_transact_set_security_desc_time);
- printf("notify_change_count: %u\n", profile_p->NT_transact_notify_change_count);
- printf("notify_change_time: %u\n", profile_p->NT_transact_notify_change_time);
- printf("rename_count: %u\n", profile_p->NT_transact_rename_count);
- printf("rename_time: %u\n", profile_p->NT_transact_rename_time);
- printf("query_security_desc_count: %u\n", profile_p->NT_transact_query_security_desc_count);
- printf("query_security_desc_time: %u\n", profile_p->NT_transact_query_security_desc_time);
- printf("************************ ACL Calls *******************************\n");
- printf("get_nt_acl_count: %u\n", profile_p->get_nt_acl_count);
- printf("get_nt_acl_time: %u\n", profile_p->get_nt_acl_time);
- printf("fget_nt_acl_count: %u\n", profile_p->fget_nt_acl_count);
- printf("fget_nt_acl_time: %u\n", profile_p->fget_nt_acl_time);
- printf("set_nt_acl_count: %u\n", profile_p->set_nt_acl_count);
- printf("set_nt_acl_time: %u\n", profile_p->set_nt_acl_time);
- printf("fset_nt_acl_count: %u\n", profile_p->fset_nt_acl_count);
- printf("fset_nt_acl_time: %u\n", profile_p->fset_nt_acl_time);
- printf("chmod_acl_count: %u\n", profile_p->chmod_acl_count);
- printf("chmod_acl_time: %u\n", profile_p->chmod_acl_time);
- printf("fchmod_acl_count: %u\n", profile_p->fchmod_acl_count);
- printf("fchmod_acl_time: %u\n", profile_p->fchmod_acl_time);
- printf("************************ NMBD Calls ****************************\n");
- printf("name_release_count: %u\n", profile_p->name_release_count);
- printf("name_release_time: %u\n", profile_p->name_release_time);
- printf("name_refresh_count: %u\n", profile_p->name_refresh_count);
- printf("name_refresh_time: %u\n", profile_p->name_refresh_time);
- printf("name_registration_count: %u\n", profile_p->name_registration_count);
- printf("name_registration_time: %u\n", profile_p->name_registration_time);
- printf("node_status_count: %u\n", profile_p->node_status_count);
- printf("node_status_time: %u\n", profile_p->node_status_time);
- printf("name_query_count: %u\n", profile_p->name_query_count);
- printf("name_query_time: %u\n", profile_p->name_query_time);
- printf("host_announce_count: %u\n", profile_p->host_announce_count);
- printf("host_announce_time: %u\n", profile_p->host_announce_time);
- printf("workgroup_announce_count: %u\n", profile_p->workgroup_announce_count);
- printf("workgroup_announce_time: %u\n", profile_p->workgroup_announce_time);
- printf("local_master_announce_count: %u\n", profile_p->local_master_announce_count);
- printf("local_master_announce_time: %u\n", profile_p->local_master_announce_time);
- printf("master_browser_announce_count: %u\n", profile_p->master_browser_announce_count);
- printf("master_browser_announce_time: %u\n", profile_p->master_browser_announce_time);
- printf("lm_host_announce_count: %u\n", profile_p->lm_host_announce_count);
- printf("lm_host_announce_time: %u\n", profile_p->lm_host_announce_time);
- printf("get_backup_list_count: %u\n", profile_p->get_backup_list_count);
- printf("get_backup_list_time: %u\n", profile_p->get_backup_list_time);
- printf("reset_browser_count: %u\n", profile_p->reset_browser_count);
- printf("reset_browser_time: %u\n", profile_p->reset_browser_time);
- printf("announce_request_count: %u\n", profile_p->announce_request_count);
- printf("announce_request_time: %u\n", profile_p->announce_request_time);
- printf("lm_announce_request_count: %u\n", profile_p->lm_announce_request_count);
- printf("lm_announce_request_time: %u\n", profile_p->lm_announce_request_time);
- printf("domain_logon_count: %u\n", profile_p->domain_logon_count);
- printf("domain_logon_time: %u\n", profile_p->domain_logon_time);
- printf("sync_browse_lists_count: %u\n", profile_p->sync_browse_lists_count);
- printf("sync_browse_lists_time: %u\n", profile_p->sync_browse_lists_time);
- printf("run_elections_count: %u\n", profile_p->run_elections_count);
- printf("run_elections_time: %u\n", profile_p->run_elections_time);
- printf("election_count: %u\n", profile_p->election_count);
- printf("election_time: %u\n", profile_p->election_time);
+ d_printf("smb_count: %u\n", profile_p->smb_count);
+ d_printf("uid_changes: %u\n", profile_p->uid_changes);
+ d_printf("************************ System Calls ****************************\n");
+ d_printf("opendir_count: %u\n", profile_p->syscall_opendir_count);
+ d_printf("opendir_time: %u\n", profile_p->syscall_opendir_time);
+ d_printf("readdir_count: %u\n", profile_p->syscall_readdir_count);
+ d_printf("readdir_time: %u\n", profile_p->syscall_readdir_time);
+ d_printf("mkdir_count: %u\n", profile_p->syscall_mkdir_count);
+ d_printf("mkdir_time: %u\n", profile_p->syscall_mkdir_time);
+ d_printf("rmdir_count: %u\n", profile_p->syscall_rmdir_count);
+ d_printf("rmdir_time: %u\n", profile_p->syscall_rmdir_time);
+ d_printf("closedir_count: %u\n", profile_p->syscall_closedir_count);
+ d_printf("closedir_time: %u\n", profile_p->syscall_closedir_time);
+ d_printf("open_count: %u\n", profile_p->syscall_open_count);
+ d_printf("open_time: %u\n", profile_p->syscall_open_time);
+ d_printf("close_count: %u\n", profile_p->syscall_close_count);
+ d_printf("close_time: %u\n", profile_p->syscall_close_time);
+ d_printf("read_count: %u\n", profile_p->syscall_read_count);
+ d_printf("read_time: %u\n", profile_p->syscall_read_time);
+ d_printf("read_bytes: %u\n", profile_p->syscall_read_bytes);
+ d_printf("write_count: %u\n", profile_p->syscall_write_count);
+ d_printf("write_time: %u\n", profile_p->syscall_write_time);
+ d_printf("write_bytes: %u\n", profile_p->syscall_write_bytes);
+ d_printf("lseek_count: %u\n", profile_p->syscall_lseek_count);
+ d_printf("lseek_time: %u\n", profile_p->syscall_lseek_time);
+ d_printf("rename_count: %u\n", profile_p->syscall_rename_count);
+ d_printf("rename_time: %u\n", profile_p->syscall_rename_time);
+ d_printf("fsync_count: %u\n", profile_p->syscall_fsync_count);
+ d_printf("fsync_time: %u\n", profile_p->syscall_fsync_time);
+ d_printf("stat_count: %u\n", profile_p->syscall_stat_count);
+ d_printf("stat_time: %u\n", profile_p->syscall_stat_time);
+ d_printf("fstat_count: %u\n", profile_p->syscall_fstat_count);
+ d_printf("fstat_time: %u\n", profile_p->syscall_fstat_time);
+ d_printf("lstat_count: %u\n", profile_p->syscall_lstat_count);
+ d_printf("lstat_time: %u\n", profile_p->syscall_lstat_time);
+ d_printf("unlink_count: %u\n", profile_p->syscall_unlink_count);
+ d_printf("unlink_time: %u\n", profile_p->syscall_unlink_time);
+ d_printf("chmod_count: %u\n", profile_p->syscall_chmod_count);
+ d_printf("chmod_time: %u\n", profile_p->syscall_chmod_time);
+ d_printf("fchmod_count: %u\n", profile_p->syscall_fchmod_count);
+ d_printf("fchmod_time: %u\n", profile_p->syscall_fchmod_time);
+ d_printf("chown_count: %u\n", profile_p->syscall_chown_count);
+ d_printf("chown_time: %u\n", profile_p->syscall_chown_time);
+ d_printf("fchown_count: %u\n", profile_p->syscall_fchown_count);
+ d_printf("fchown_time: %u\n", profile_p->syscall_fchown_time);
+ d_printf("chdir_count: %u\n", profile_p->syscall_chdir_count);
+ d_printf("chdir_time: %u\n", profile_p->syscall_chdir_time);
+ d_printf("getwd_count: %u\n", profile_p->syscall_getwd_count);
+ d_printf("getwd_time: %u\n", profile_p->syscall_getwd_time);
+ d_printf("utime_count: %u\n", profile_p->syscall_utime_count);
+ d_printf("utime_time: %u\n", profile_p->syscall_utime_time);
+ d_printf("ftruncate_count: %u\n", profile_p->syscall_ftruncate_count);
+ d_printf("ftruncate_time: %u\n", profile_p->syscall_ftruncate_time);
+ d_printf("fcntl_lock_count: %u\n", profile_p->syscall_fcntl_lock_count);
+ d_printf("fcntl_lock_time: %u\n", profile_p->syscall_fcntl_lock_time);
+ d_printf("readlink_count: %u\n", profile_p->syscall_readlink_count);
+ d_printf("readlink_time: %u\n", profile_p->syscall_readlink_time);
+ d_printf("symlink_count: %u\n", profile_p->syscall_symlink_count);
+ d_printf("symlink_time: %u\n", profile_p->syscall_symlink_time);
+ d_printf("************************ Statcache *******************************\n");
+ d_printf("lookups: %u\n", profile_p->statcache_lookups);
+ d_printf("misses: %u\n", profile_p->statcache_misses);
+ d_printf("hits: %u\n", profile_p->statcache_hits);
+ d_printf("************************ Writecache ******************************\n");
+ d_printf("read_hits: %u\n", profile_p->writecache_read_hits);
+ d_printf("abutted_writes: %u\n", profile_p->writecache_abutted_writes);
+ d_printf("total_writes: %u\n", profile_p->writecache_total_writes);
+ d_printf("non_oplock_writes: %u\n", profile_p->writecache_non_oplock_writes);
+ d_printf("direct_writes: %u\n", profile_p->writecache_direct_writes);
+ d_printf("init_writes: %u\n", profile_p->writecache_init_writes);
+ d_printf("flushed_writes[SEEK]: %u\n", profile_p->writecache_flushed_writes[SEEK_FLUSH]);
+ d_printf("flushed_writes[READ]: %u\n", profile_p->writecache_flushed_writes[READ_FLUSH]);
+ d_printf("flushed_writes[WRITE]: %u\n", profile_p->writecache_flushed_writes[WRITE_FLUSH]);
+ d_printf("flushed_writes[READRAW]: %u\n", profile_p->writecache_flushed_writes[READRAW_FLUSH]);
+ d_printf("flushed_writes[OPLOCK_RELEASE]: %u\n", profile_p->writecache_flushed_writes[OPLOCK_RELEASE_FLUSH]);
+ d_printf("flushed_writes[CLOSE]: %u\n", profile_p->writecache_flushed_writes[CLOSE_FLUSH]);
+ d_printf("flushed_writes[SYNC]: %u\n", profile_p->writecache_flushed_writes[SYNC_FLUSH]);
+ d_printf("flushed_writes[SIZECHANGE]: %u\n", profile_p->writecache_flushed_writes[SIZECHANGE_FLUSH]);
+ d_printf("num_perfect_writes: %u\n", profile_p->writecache_num_perfect_writes);
+ d_printf("num_write_caches: %u\n", profile_p->writecache_num_write_caches);
+ d_printf("allocated_write_caches: %u\n", profile_p->writecache_allocated_write_caches);
+ d_printf("************************ SMB Calls *******************************\n");
+ d_printf("mkdir_count: %u\n", profile_p->SMBmkdir_count);
+ d_printf("mkdir_time: %u\n", profile_p->SMBmkdir_time);
+ d_printf("rmdir_count: %u\n", profile_p->SMBrmdir_count);
+ d_printf("rmdir_time: %u\n", profile_p->SMBrmdir_time);
+ d_printf("open_count: %u\n", profile_p->SMBopen_count);
+ d_printf("open_time: %u\n", profile_p->SMBopen_time);
+ d_printf("create_count: %u\n", profile_p->SMBcreate_count);
+ d_printf("create_time: %u\n", profile_p->SMBcreate_time);
+ d_printf("close_count: %u\n", profile_p->SMBclose_count);
+ d_printf("close_time: %u\n", profile_p->SMBclose_time);
+ d_printf("flush_count: %u\n", profile_p->SMBflush_count);
+ d_printf("flush_time: %u\n", profile_p->SMBflush_time);
+ d_printf("unlink_count: %u\n", profile_p->SMBunlink_count);
+ d_printf("unlink_time: %u\n", profile_p->SMBunlink_time);
+ d_printf("mv_count: %u\n", profile_p->SMBmv_count);
+ d_printf("mv_time: %u\n", profile_p->SMBmv_time);
+ d_printf("getatr_count: %u\n", profile_p->SMBgetatr_count);
+ d_printf("getatr_time: %u\n", profile_p->SMBgetatr_time);
+ d_printf("setatr_count: %u\n", profile_p->SMBsetatr_count);
+ d_printf("setatr_time: %u\n", profile_p->SMBsetatr_time);
+ d_printf("read_count: %u\n", profile_p->SMBread_count);
+ d_printf("read_time: %u\n", profile_p->SMBread_time);
+ d_printf("write_count: %u\n", profile_p->SMBwrite_count);
+ d_printf("write_time: %u\n", profile_p->SMBwrite_time);
+ d_printf("lock_count: %u\n", profile_p->SMBlock_count);
+ d_printf("lock_time: %u\n", profile_p->SMBlock_time);
+ d_printf("unlock_count: %u\n", profile_p->SMBunlock_count);
+ d_printf("unlock_time: %u\n", profile_p->SMBunlock_time);
+ d_printf("ctemp_count: %u\n", profile_p->SMBctemp_count);
+ d_printf("ctemp_time: %u\n", profile_p->SMBctemp_time);
+ d_printf("mknew_count: %u\n", profile_p->SMBmknew_count);
+ d_printf("mknew_time: %u\n", profile_p->SMBmknew_time);
+ d_printf("chkpth_count: %u\n", profile_p->SMBchkpth_count);
+ d_printf("chkpth_time: %u\n", profile_p->SMBchkpth_time);
+ d_printf("exit_count: %u\n", profile_p->SMBexit_count);
+ d_printf("exit_time: %u\n", profile_p->SMBexit_time);
+ d_printf("lseek_count: %u\n", profile_p->SMBlseek_count);
+ d_printf("lseek_time: %u\n", profile_p->SMBlseek_time);
+ d_printf("lockread_count: %u\n", profile_p->SMBlockread_count);
+ d_printf("lockread_time: %u\n", profile_p->SMBlockread_time);
+ d_printf("writeunlock_count: %u\n", profile_p->SMBwriteunlock_count);
+ d_printf("writeunlock_time: %u\n", profile_p->SMBwriteunlock_time);
+ d_printf("readbraw_count: %u\n", profile_p->SMBreadbraw_count);
+ d_printf("readbraw_time: %u\n", profile_p->SMBreadbraw_time);
+ d_printf("readBmpx_count: %u\n", profile_p->SMBreadBmpx_count);
+ d_printf("readBmpx_time: %u\n", profile_p->SMBreadBmpx_time);
+ d_printf("readBs_count: %u\n", profile_p->SMBreadBs_count);
+ d_printf("readBs_time: %u\n", profile_p->SMBreadBs_time);
+ d_printf("writebraw_count: %u\n", profile_p->SMBwritebraw_count);
+ d_printf("writebraw_time: %u\n", profile_p->SMBwritebraw_time);
+ d_printf("writeBmpx_count: %u\n", profile_p->SMBwriteBmpx_count);
+ d_printf("writeBmpx_time: %u\n", profile_p->SMBwriteBmpx_time);
+ d_printf("writeBs_count: %u\n", profile_p->SMBwriteBs_count);
+ d_printf("writeBs_time: %u\n", profile_p->SMBwriteBs_time);
+ d_printf("writec_count: %u\n", profile_p->SMBwritec_count);
+ d_printf("writec_time: %u\n", profile_p->SMBwritec_time);
+ d_printf("setattrE_count: %u\n", profile_p->SMBsetattrE_count);
+ d_printf("setattrE_time: %u\n", profile_p->SMBsetattrE_time);
+ d_printf("getattrE_count: %u\n", profile_p->SMBgetattrE_count);
+ d_printf("getattrE_time: %u\n", profile_p->SMBgetattrE_time);
+ d_printf("lockingX_count: %u\n", profile_p->SMBlockingX_count);
+ d_printf("lockingX_time: %u\n", profile_p->SMBlockingX_time);
+ d_printf("trans_count: %u\n", profile_p->SMBtrans_count);
+ d_printf("trans_time: %u\n", profile_p->SMBtrans_time);
+ d_printf("transs_count: %u\n", profile_p->SMBtranss_count);
+ d_printf("transs_time: %u\n", profile_p->SMBtranss_time);
+ d_printf("ioctl_count: %u\n", profile_p->SMBioctl_count);
+ d_printf("ioctl_time: %u\n", profile_p->SMBioctl_time);
+ d_printf("ioctls_count: %u\n", profile_p->SMBioctls_count);
+ d_printf("ioctls_time: %u\n", profile_p->SMBioctls_time);
+ d_printf("copy_count: %u\n", profile_p->SMBcopy_count);
+ d_printf("copy_time: %u\n", profile_p->SMBcopy_time);
+ d_printf("move_count: %u\n", profile_p->SMBmove_count);
+ d_printf("move_time: %u\n", profile_p->SMBmove_time);
+ d_printf("echo_count: %u\n", profile_p->SMBecho_count);
+ d_printf("echo_time: %u\n", profile_p->SMBecho_time);
+ d_printf("writeclose_count: %u\n", profile_p->SMBwriteclose_count);
+ d_printf("writeclose_time: %u\n", profile_p->SMBwriteclose_time);
+ d_printf("openX_count: %u\n", profile_p->SMBopenX_count);
+ d_printf("openX_time: %u\n", profile_p->SMBopenX_time);
+ d_printf("readX_count: %u\n", profile_p->SMBreadX_count);
+ d_printf("readX_time: %u\n", profile_p->SMBreadX_time);
+ d_printf("writeX_count: %u\n", profile_p->SMBwriteX_count);
+ d_printf("writeX_time: %u\n", profile_p->SMBwriteX_time);
+ d_printf("trans2_count: %u\n", profile_p->SMBtrans2_count);
+ d_printf("trans2_time: %u\n", profile_p->SMBtrans2_time);
+ d_printf("transs2_count: %u\n", profile_p->SMBtranss2_count);
+ d_printf("transs2_time: %u\n", profile_p->SMBtranss2_time);
+ d_printf("findclose_count: %u\n", profile_p->SMBfindclose_count);
+ d_printf("findclose_time: %u\n", profile_p->SMBfindclose_time);
+ d_printf("findnclose_count: %u\n", profile_p->SMBfindnclose_count);
+ d_printf("findnclose_time: %u\n", profile_p->SMBfindnclose_time);
+ d_printf("tcon_count: %u\n", profile_p->SMBtcon_count);
+ d_printf("tcon_time: %u\n", profile_p->SMBtcon_time);
+ d_printf("tdis_count: %u\n", profile_p->SMBtdis_count);
+ d_printf("tdis_time: %u\n", profile_p->SMBtdis_time);
+ d_printf("negprot_count: %u\n", profile_p->SMBnegprot_count);
+ d_printf("negprot_time: %u\n", profile_p->SMBnegprot_time);
+ d_printf("sesssetupX_count: %u\n", profile_p->SMBsesssetupX_count);
+ d_printf("sesssetupX_time: %u\n", profile_p->SMBsesssetupX_time);
+ d_printf("ulogoffX_count: %u\n", profile_p->SMBulogoffX_count);
+ d_printf("ulogoffX_time: %u\n", profile_p->SMBulogoffX_time);
+ d_printf("tconX_count: %u\n", profile_p->SMBtconX_count);
+ d_printf("tconX_time: %u\n", profile_p->SMBtconX_time);
+ d_printf("dskattr_count: %u\n", profile_p->SMBdskattr_count);
+ d_printf("dskattr_time: %u\n", profile_p->SMBdskattr_time);
+ d_printf("search_count: %u\n", profile_p->SMBsearch_count);
+ d_printf("search_time: %u\n", profile_p->SMBsearch_time);
+ d_printf("ffirst_count: %u\n", profile_p->SMBffirst_count);
+ d_printf("ffirst_time: %u\n", profile_p->SMBffirst_time);
+ d_printf("funique_count: %u\n", profile_p->SMBfunique_count);
+ d_printf("funique_time: %u\n", profile_p->SMBfunique_time);
+ d_printf("fclose_count: %u\n", profile_p->SMBfclose_count);
+ d_printf("fclose_time: %u\n", profile_p->SMBfclose_time);
+ d_printf("nttrans_count: %u\n", profile_p->SMBnttrans_count);
+ d_printf("nttrans_time: %u\n", profile_p->SMBnttrans_time);
+ d_printf("nttranss_count: %u\n", profile_p->SMBnttranss_count);
+ d_printf("nttranss_time: %u\n", profile_p->SMBnttranss_time);
+ d_printf("ntcreateX_count: %u\n", profile_p->SMBntcreateX_count);
+ d_printf("ntcreateX_time: %u\n", profile_p->SMBntcreateX_time);
+ d_printf("ntcancel_count: %u\n", profile_p->SMBntcancel_count);
+ d_printf("ntcancel_time: %u\n", profile_p->SMBntcancel_time);
+ d_printf("splopen_count: %u\n", profile_p->SMBsplopen_count);
+ d_printf("splopen_time: %u\n", profile_p->SMBsplopen_time);
+ d_printf("splwr_count: %u\n", profile_p->SMBsplwr_count);
+ d_printf("splwr_time: %u\n", profile_p->SMBsplwr_time);
+ d_printf("splclose_count: %u\n", profile_p->SMBsplclose_count);
+ d_printf("splclose_time: %u\n", profile_p->SMBsplclose_time);
+ d_printf("splretq_count: %u\n", profile_p->SMBsplretq_count);
+ d_printf("splretq_time: %u\n", profile_p->SMBsplretq_time);
+ d_printf("sends_count: %u\n", profile_p->SMBsends_count);
+ d_printf("sends_time: %u\n", profile_p->SMBsends_time);
+ d_printf("sendb_count: %u\n", profile_p->SMBsendb_count);
+ d_printf("sendb_time: %u\n", profile_p->SMBsendb_time);
+ d_printf("fwdname_count: %u\n", profile_p->SMBfwdname_count);
+ d_printf("fwdname_time: %u\n", profile_p->SMBfwdname_time);
+ d_printf("cancelf_count: %u\n", profile_p->SMBcancelf_count);
+ d_printf("cancelf_time: %u\n", profile_p->SMBcancelf_time);
+ d_printf("getmac_count: %u\n", profile_p->SMBgetmac_count);
+ d_printf("getmac_time: %u\n", profile_p->SMBgetmac_time);
+ d_printf("sendstrt_count: %u\n", profile_p->SMBsendstrt_count);
+ d_printf("sendstrt_time: %u\n", profile_p->SMBsendstrt_time);
+ d_printf("sendend_count: %u\n", profile_p->SMBsendend_count);
+ d_printf("sendend_time: %u\n", profile_p->SMBsendend_time);
+ d_printf("sendtxt_count: %u\n", profile_p->SMBsendtxt_count);
+ d_printf("sendtxt_time: %u\n", profile_p->SMBsendtxt_time);
+ d_printf("invalid_count: %u\n", profile_p->SMBinvalid_count);
+ d_printf("invalid_time: %u\n", profile_p->SMBinvalid_time);
+ d_printf("************************ Pathworks Calls *************************\n");
+ d_printf("setdir_count: %u\n", profile_p->pathworks_setdir_count);
+ d_printf("setdir_time: %u\n", profile_p->pathworks_setdir_time);
+ d_printf("************************ Trans2 Calls ****************************\n");
+ d_printf("open_count: %u\n", profile_p->Trans2_open_count);
+ d_printf("open_time: %u\n", profile_p->Trans2_open_time);
+ d_printf("findfirst_count: %u\n", profile_p->Trans2_findfirst_count);
+ d_printf("findfirst_time: %u\n", profile_p->Trans2_findfirst_time);
+ d_printf("findnext_count: %u\n", profile_p->Trans2_findnext_count);
+ d_printf("findnext_time: %u\n", profile_p->Trans2_findnext_time);
+ d_printf("qfsinfo_count: %u\n", profile_p->Trans2_qfsinfo_count);
+ d_printf("qfsinfo_time: %u\n", profile_p->Trans2_qfsinfo_time);
+ d_printf("setfsinfo_count: %u\n", profile_p->Trans2_setfsinfo_count);
+ d_printf("setfsinfo_time: %u\n", profile_p->Trans2_setfsinfo_time);
+ d_printf("qpathinfo_count: %u\n", profile_p->Trans2_qpathinfo_count);
+ d_printf("qpathinfo_time: %u\n", profile_p->Trans2_qpathinfo_time);
+ d_printf("setpathinfo_count: %u\n", profile_p->Trans2_setpathinfo_count);
+ d_printf("setpathinfo_time: %u\n", profile_p->Trans2_setpathinfo_time);
+ d_printf("qfileinfo_count: %u\n", profile_p->Trans2_qfileinfo_count);
+ d_printf("qfileinfo_time: %u\n", profile_p->Trans2_qfileinfo_time);
+ d_printf("setfileinfo_count: %u\n", profile_p->Trans2_setfileinfo_count);
+ d_printf("setfileinfo_time: %u\n", profile_p->Trans2_setfileinfo_time);
+ d_printf("fsctl_count: %u\n", profile_p->Trans2_fsctl_count);
+ d_printf("fsctl_time: %u\n", profile_p->Trans2_fsctl_time);
+ d_printf("ioctl_count: %u\n", profile_p->Trans2_ioctl_count);
+ d_printf("ioctl_time: %u\n", profile_p->Trans2_ioctl_time);
+ d_printf("findnotifyfirst_count: %u\n", profile_p->Trans2_findnotifyfirst_count);
+ d_printf("findnotifyfirst_time: %u\n", profile_p->Trans2_findnotifyfirst_time);
+ d_printf("findnotifynext_count: %u\n", profile_p->Trans2_findnotifynext_count);
+ d_printf("findnotifynext_time: %u\n", profile_p->Trans2_findnotifynext_time);
+ d_printf("mkdir_count: %u\n", profile_p->Trans2_mkdir_count);
+ d_printf("mkdir_time: %u\n", profile_p->Trans2_mkdir_time);
+ d_printf("session_setup_count: %u\n", profile_p->Trans2_session_setup_count);
+ d_printf("session_setup_time: %u\n", profile_p->Trans2_session_setup_time);
+ d_printf("get_dfs_referral_count: %u\n", profile_p->Trans2_get_dfs_referral_count);
+ d_printf("get_dfs_referral_time: %u\n", profile_p->Trans2_get_dfs_referral_time);
+ d_printf("report_dfs_inconsistancy_count: %u\n", profile_p->Trans2_report_dfs_inconsistancy_count);
+ d_printf("report_dfs_inconsistancy_time: %u\n", profile_p->Trans2_report_dfs_inconsistancy_time);
+ d_printf("************************ NT Transact Calls ***********************\n");
+ d_printf("create_count: %u\n", profile_p->NT_transact_create_count);
+ d_printf("create_time: %u\n", profile_p->NT_transact_create_time);
+ d_printf("ioctl_count: %u\n", profile_p->NT_transact_ioctl_count);
+ d_printf("ioctl_time: %u\n", profile_p->NT_transact_ioctl_time);
+ d_printf("set_security_desc_count: %u\n", profile_p->NT_transact_set_security_desc_count);
+ d_printf("set_security_desc_time: %u\n", profile_p->NT_transact_set_security_desc_time);
+ d_printf("notify_change_count: %u\n", profile_p->NT_transact_notify_change_count);
+ d_printf("notify_change_time: %u\n", profile_p->NT_transact_notify_change_time);
+ d_printf("rename_count: %u\n", profile_p->NT_transact_rename_count);
+ d_printf("rename_time: %u\n", profile_p->NT_transact_rename_time);
+ d_printf("query_security_desc_count: %u\n", profile_p->NT_transact_query_security_desc_count);
+ d_printf("query_security_desc_time: %u\n", profile_p->NT_transact_query_security_desc_time);
+ d_printf("************************ ACL Calls *******************************\n");
+ d_printf("get_nt_acl_count: %u\n", profile_p->get_nt_acl_count);
+ d_printf("get_nt_acl_time: %u\n", profile_p->get_nt_acl_time);
+ d_printf("fget_nt_acl_count: %u\n", profile_p->fget_nt_acl_count);
+ d_printf("fget_nt_acl_time: %u\n", profile_p->fget_nt_acl_time);
+ d_printf("set_nt_acl_count: %u\n", profile_p->set_nt_acl_count);
+ d_printf("set_nt_acl_time: %u\n", profile_p->set_nt_acl_time);
+ d_printf("fset_nt_acl_count: %u\n", profile_p->fset_nt_acl_count);
+ d_printf("fset_nt_acl_time: %u\n", profile_p->fset_nt_acl_time);
+ d_printf("chmod_acl_count: %u\n", profile_p->chmod_acl_count);
+ d_printf("chmod_acl_time: %u\n", profile_p->chmod_acl_time);
+ d_printf("fchmod_acl_count: %u\n", profile_p->fchmod_acl_count);
+ d_printf("fchmod_acl_time: %u\n", profile_p->fchmod_acl_time);
+ d_printf("************************ NMBD Calls ****************************\n");
+ d_printf("name_release_count: %u\n", profile_p->name_release_count);
+ d_printf("name_release_time: %u\n", profile_p->name_release_time);
+ d_printf("name_refresh_count: %u\n", profile_p->name_refresh_count);
+ d_printf("name_refresh_time: %u\n", profile_p->name_refresh_time);
+ d_printf("name_registration_count: %u\n", profile_p->name_registration_count);
+ d_printf("name_registration_time: %u\n", profile_p->name_registration_time);
+ d_printf("node_status_count: %u\n", profile_p->node_status_count);
+ d_printf("node_status_time: %u\n", profile_p->node_status_time);
+ d_printf("name_query_count: %u\n", profile_p->name_query_count);
+ d_printf("name_query_time: %u\n", profile_p->name_query_time);
+ d_printf("host_announce_count: %u\n", profile_p->host_announce_count);
+ d_printf("host_announce_time: %u\n", profile_p->host_announce_time);
+ d_printf("workgroup_announce_count: %u\n", profile_p->workgroup_announce_count);
+ d_printf("workgroup_announce_time: %u\n", profile_p->workgroup_announce_time);
+ d_printf("local_master_announce_count: %u\n", profile_p->local_master_announce_count);
+ d_printf("local_master_announce_time: %u\n", profile_p->local_master_announce_time);
+ d_printf("master_browser_announce_count: %u\n", profile_p->master_browser_announce_count);
+ d_printf("master_browser_announce_time: %u\n", profile_p->master_browser_announce_time);
+ d_printf("lm_host_announce_count: %u\n", profile_p->lm_host_announce_count);
+ d_printf("lm_host_announce_time: %u\n", profile_p->lm_host_announce_time);
+ d_printf("get_backup_list_count: %u\n", profile_p->get_backup_list_count);
+ d_printf("get_backup_list_time: %u\n", profile_p->get_backup_list_time);
+ d_printf("reset_browser_count: %u\n", profile_p->reset_browser_count);
+ d_printf("reset_browser_time: %u\n", profile_p->reset_browser_time);
+ d_printf("announce_request_count: %u\n", profile_p->announce_request_count);
+ d_printf("announce_request_time: %u\n", profile_p->announce_request_time);
+ d_printf("lm_announce_request_count: %u\n", profile_p->lm_announce_request_count);
+ d_printf("lm_announce_request_time: %u\n", profile_p->lm_announce_request_time);
+ d_printf("domain_logon_count: %u\n", profile_p->domain_logon_count);
+ d_printf("domain_logon_time: %u\n", profile_p->domain_logon_time);
+ d_printf("sync_browse_lists_count: %u\n", profile_p->sync_browse_lists_count);
+ d_printf("sync_browse_lists_time: %u\n", profile_p->sync_browse_lists_time);
+ d_printf("run_elections_count: %u\n", profile_p->run_elections_count);
+ d_printf("run_elections_time: %u\n", profile_p->run_elections_time);
+ d_printf("election_count: %u\n", profile_p->election_count);
+ d_printf("election_time: %u\n", profile_p->election_time);
return 0;
}
@@ -512,7 +512,7 @@ static int traverse_fn1(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *st
return 0;
}
- printf("%-10.10s %5d %-12s %s",
+ d_printf("%-10.10s %5d %-12s %s",
crec.name,(int)crec.pid,
crec.machine,
asctime(LocalTime(&crec.start)));
@@ -533,7 +533,7 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo
return 0;
}
- printf("%5d %-12s %-12s %-12s (%s)\n",
+ d_printf("%5d %-12s %-12s %-12s (%s)\n",
(int)sessionid.pid, uidtoname(sessionid.uid), gidtoname(sessionid.gid),
sessionid.remote_machine, sessionid.hostname);
@@ -559,7 +559,7 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo
dbf = stderr;
if (getuid() != geteuid()) {
- printf("smbstatus should not be run setuid\n");
+ d_printf("smbstatus should not be run setuid\n");
return(1);
}
@@ -612,7 +612,7 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo
}
if (verbose) {
- printf("using configfile = %s\n", servicesf);
+ d_printf("using configfile = %s\n", servicesf);
}
if (profile_only) {
@@ -621,30 +621,30 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo
tdb = tdb_open_log(lock_path("sessionid.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0);
if (!tdb) {
- printf("sessionid.tdb not initialised\n");
+ d_printf("sessionid.tdb not initialised\n");
}
if (locks_only) goto locks;
- printf("\nSamba version %s\n",VERSION);
- printf("PID Username Group Machine \n");
- printf("-------------------------------------------------------------------\n");
+ d_printf("\nSamba version %s\n",VERSION);
+ d_printf("PID Username Group Machine \n");
+ d_printf("-------------------------------------------------------------------\n");
tdb_traverse(tdb, traverse_sessionid, NULL);
tdb_close(tdb);
tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0);
if (!tdb) {
- printf("connections.tdb not initialised\n");
+ d_printf("connections.tdb not initialised\n");
} else if (verbose) {
- printf("Opened status file %s\n", fname);
+ d_printf("Opened status file %s\n", fname);
}
if (brief)
exit(0);
- printf("\nService pid machine Connected at\n");
- printf("-------------------------------------------------------\n");
+ d_printf("\nService pid machine Connected at\n");
+ d_printf("-------------------------------------------------------\n");
tdb_traverse(tdb, traverse_fn1, NULL);
tdb_close(tdb);
@@ -656,19 +656,19 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo
int ret;
if (!locking_init(1)) {
- printf("Can't initialise locking module - exiting\n");
+ d_printf("Can't initialise locking module - exiting\n");
exit(1);
}
ret = share_mode_forall(print_share_mode);
if (ret == 0) {
- printf("No locked files\n");
+ d_printf("No locked files\n");
} else if (ret == -1) {
- printf("locked file list truncated\n");
+ d_printf("locked file list truncated\n");
}
- printf("\n");
+ d_printf("\n");
if (show_brl) {
brl_forall(print_brl);
diff --git a/source3/web/swat.c b/source3/web/swat.c
index 5dcfe3d658..f963c16ccf 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -114,7 +114,7 @@ static int include_html(char *fname)
int ret;
if (!f) {
- printf("ERROR: Can't open %s\n", fname);
+ d_printf("ERROR: Can't open %s\n", fname);
return 0;
}
@@ -134,13 +134,13 @@ static int include_html(char *fname)
static void print_header(void)
{
if (!cgi_waspost()) {
- printf("Expires: 0\r\n");
+ d_printf("Expires: 0\r\n");
}
- printf("Content-type: text/html\r\n\r\n");
+ d_printf("Content-type: text/html\r\n\r\n");
if (!include_html("include/header.html")) {
- printf("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n");
- printf("<HTML>\n<HEAD>\n<TITLE>Samba Web Administration Tool</TITLE>\n</HEAD>\n<BODY background=\"/swat/images/background.jpg\">\n\n");
+ d_printf("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n");
+ d_printf("<HTML>\n<HEAD>\n<TITLE>Samba Web Administration Tool</TITLE>\n</HEAD>\n<BODY background=\"/swat/images/background.jpg\">\n\n");
}
}
@@ -150,7 +150,7 @@ static void print_header(void)
static void print_footer(void)
{
if (!include_html("include/footer.html")) {
- printf("\n</BODY>\n</HTML>\n");
+ d_printf("\n</BODY>\n</HTML>\n");
}
}
@@ -169,100 +169,100 @@ static void show_parameter(int snum, struct parm_struct *parm)
str = stripspace(parm->label);
strupper (str);
- printf("<tr><td><A HREF=\"/swat/help/smb.conf.5.html#%s\" target=\"docs\">Help</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %s</td><td>",
+ d_printf("<tr><td><A HREF=\"/swat/help/smb.conf.5.html#%s\" target=\"docs\">Help</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %s</td><td>",
str, parm->label);
switch (parm->type) {
case P_CHAR:
- printf("<input type=text size=2 name=\"parm_%s\" value=\"%c\">",
+ d_printf("<input type=text size=2 name=\"parm_%s\" value=\"%c\">",
make_parm_name(parm->label), *(char *)ptr);
- printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%c\'\">",
+ d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%c\'\">",
make_parm_name(parm->label),(char)(parm->def.cvalue));
break;
case P_LIST:
- printf("<input type=text size=40 name=\"parm_%s\" value=\"",
+ d_printf("<input type=text size=40 name=\"parm_%s\" value=\"",
make_parm_name(parm->label));
if ((char ***)ptr && *(char ***)ptr && **(char ***)ptr) {
char **list = *(char ***)ptr;
for (;*list;list++) {
- printf("%s%s", *list, ((*(list+1))?" ":""));
+ d_printf("%s%s", *list, ((*(list+1))?" ":""));
}
}
- printf("\">");
- printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'",
+ d_printf("\">");
+ d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'",
make_parm_name(parm->label));
if (parm->def.lvalue) {
char **list = (char **)(parm->def.lvalue);
for (; *list; list++) {
- printf("%s%s", *list, ((*(list+1))?" ":""));
+ d_printf("%s%s", *list, ((*(list+1))?" ":""));
}
}
- printf("\'\">");
+ d_printf("\'\">");
break;
case P_STRING:
case P_USTRING:
- printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">",
+ d_printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">",
make_parm_name(parm->label), *(char **)ptr);
- printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%s\'\">",
+ d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%s\'\">",
make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue)));
break;
case P_GSTRING:
case P_UGSTRING:
- printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">",
+ d_printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">",
make_parm_name(parm->label), (char *)ptr);
- printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%s\'\">",
+ d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%s\'\">",
make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue)));
break;
case P_BOOL:
- printf("<select name=\"parm_%s\">",make_parm_name(parm->label));
- printf("<option %s>Yes", (*(BOOL *)ptr)?"selected":"");
- printf("<option %s>No", (*(BOOL *)ptr)?"":"selected");
- printf("</select>");
- printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">",
+ d_printf("<select name=\"parm_%s\">",make_parm_name(parm->label));
+ d_printf("<option %s>Yes", (*(BOOL *)ptr)?"selected":"");
+ d_printf("<option %s>No", (*(BOOL *)ptr)?"":"selected");
+ d_printf("</select>");
+ d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">",
make_parm_name(parm->label),(BOOL)(parm->def.bvalue)?0:1);
break;
case P_BOOLREV:
- printf("<select name=\"parm_%s\">",make_parm_name(parm->label));
- printf("<option %s>Yes", (*(BOOL *)ptr)?"":"selected");
- printf("<option %s>No", (*(BOOL *)ptr)?"selected":"");
- printf("</select>");
- printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">",
+ d_printf("<select name=\"parm_%s\">",make_parm_name(parm->label));
+ d_printf("<option %s>Yes", (*(BOOL *)ptr)?"":"selected");
+ d_printf("<option %s>No", (*(BOOL *)ptr)?"selected":"");
+ d_printf("</select>");
+ d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">",
make_parm_name(parm->label),(BOOL)(parm->def.bvalue)?1:0);
break;
case P_INTEGER:
- printf("<input type=text size=8 name=\"parm_%s\" value=%d>", make_parm_name(parm->label), *(int *)ptr);
- printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%d\'\">",
+ d_printf("<input type=text size=8 name=\"parm_%s\" value=%d>", make_parm_name(parm->label), *(int *)ptr);
+ d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%d\'\">",
make_parm_name(parm->label),(int)(parm->def.ivalue));
break;
case P_OCTAL:
- printf("<input type=text size=8 name=\"parm_%s\" value=%s>", make_parm_name(parm->label), octal_string(*(int *)ptr));
- printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%s\'\">",
+ d_printf("<input type=text size=8 name=\"parm_%s\" value=%s>", make_parm_name(parm->label), octal_string(*(int *)ptr));
+ d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%s\'\">",
make_parm_name(parm->label),
octal_string((int)(parm->def.ivalue)));
break;
case P_ENUM:
- printf("<select name=\"parm_%s\">",make_parm_name(parm->label));
+ d_printf("<select name=\"parm_%s\">",make_parm_name(parm->label));
for (i=0;parm->enum_list[i].name;i++) {
if (i == 0 || parm->enum_list[i].value != parm->enum_list[i-1].value) {
- printf("<option %s>%s",(*(int *)ptr)==parm->enum_list[i].value?"selected":"",parm->enum_list[i].name);
+ d_printf("<option %s>%s",(*(int *)ptr)==parm->enum_list[i].value?"selected":"",parm->enum_list[i].name);
}
}
- printf("</select>");
- printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">",
+ d_printf("</select>");
+ d_printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.selectedIndex=\'%d\'\">",
make_parm_name(parm->label),enum_index((int)(parm->def.ivalue),parm->enum_list));
break;
case P_SEP:
break;
}
- printf("</td></tr>\n");
+ d_printf("</td></tr>\n");
}
/****************************************************************************
@@ -335,7 +335,7 @@ static void show_parameters(int snum, int allparameters, int advanced, int print
if (printers && !(parm->flags & FLAG_PRINT)) continue;
}
if (heading && heading != last_heading) {
- printf("<tr><td></td></tr><tr><td><b><u>%s</u></b></td></tr>\n", heading);
+ d_printf("<tr><td></td></tr><tr><td><b><u>%s</u></b></td></tr>\n", heading);
last_heading = heading;
}
show_parameter(snum, parm);
@@ -373,7 +373,7 @@ static int save_reload(int snum)
f = sys_fopen(servicesf,"w");
if (!f) {
- printf("failed to open %s for writing\n", servicesf);
+ d_printf("failed to open %s for writing\n", servicesf);
return 0;
}
@@ -391,7 +391,7 @@ static int save_reload(int snum)
lp_killunused(NULL);
if (!load_config(False)) {
- printf("Can't reload %s\n", servicesf);
+ d_printf("Can't reload %s\n", servicesf);
return 0;
}
iNumNonAutoPrintServices = lp_numservices();
@@ -447,7 +447,7 @@ static void commit_parameters(int snum)
****************************************************************************/
static void image_link(char *name,char *hlink, char *src)
{
- printf("<A HREF=\"%s/%s\"><img border=\"0\" src=\"/swat/%s\" alt=\"%s\"></A>\n",
+ d_printf("<A HREF=\"%s/%s\"><img border=\"0\" src=\"/swat/%s\" alt=\"%s\"></A>\n",
cgi_baseurl(), hlink, src, name);
}
@@ -460,7 +460,7 @@ static void show_main_buttons(void)
char *p;
if ((p = cgi_user_name()) && strcmp(p, "root")) {
- printf("Logged in as <b>%s</b><p>\n", p);
+ d_printf("Logged in as <b>%s</b><p>\n", p);
}
image_link("Home", "", "images/home.gif");
@@ -475,7 +475,7 @@ static void show_main_buttons(void)
}
image_link("Password Management", "passwd", "images/passwd.gif");
- printf("<HR>\n");
+ d_printf("<HR>\n");
}
/****************************************************************************
@@ -497,19 +497,19 @@ static void viewconfig_page(void)
full_view = 1;
}
- printf("<H2>Current Config</H2>\n");
- printf("<form method=post>\n");
+ d_printf("<H2>Current Config</H2>\n");
+ d_printf("<form method=post>\n");
if (full_view) {
- printf("<input type=submit name=\"normal_view\" value=\"Normal View\">\n");
+ d_printf("<input type=submit name=\"normal_view\" value=\"Normal View\">\n");
} else {
- printf("<input type=submit name=\"full_view\" value=\"Full View\">\n");
+ d_printf("<input type=submit name=\"full_view\" value=\"Full View\">\n");
}
- printf("<p><pre>");
+ d_printf("<p><pre>");
write_config(stdout, full_view);
- printf("</pre>");
- printf("</form>\n");
+ d_printf("</pre>");
+ d_printf("</form>\n");
}
/****************************************************************************
@@ -519,7 +519,7 @@ static void globals_page(void)
{
int advanced = 0;
- printf("<H2>Global Variables</H2>\n");
+ d_printf("<H2>Global Variables</H2>\n");
if (cgi_variable("Advanced") && !cgi_variable("Basic"))
advanced = 1;
@@ -529,29 +529,29 @@ static void globals_page(void)
save_reload(0);
}
- printf("<FORM name=\"swatform\" method=post>\n");
+ d_printf("<FORM name=\"swatform\" method=post>\n");
if (have_write_access) {
- printf("<input type=submit name=\"Commit\" value=\"Commit Changes\">\n");
+ d_printf("<input type=submit name=\"Commit\" value=\"Commit Changes\">\n");
}
- printf("<input type=reset name=\"Reset Values\" value=\"Reset Values\">\n");
+ d_printf("<input type=reset name=\"Reset Values\" value=\"Reset Values\">\n");
if (advanced == 0) {
- printf("<input type=submit name=\"Advanced\" value=\"Advanced View\">\n");
+ d_printf("<input type=submit name=\"Advanced\" value=\"Advanced View\">\n");
} else {
- printf("<input type=submit name=\"Basic\" value=\"Basic View\">\n");
+ d_printf("<input type=submit name=\"Basic\" value=\"Basic View\">\n");
}
- printf("<p>\n");
+ d_printf("<p>\n");
- printf("<table>\n");
+ d_printf("<table>\n");
show_parameters(GLOBALS_SNUM, 1, advanced, 0);
- printf("</table>\n");
+ d_printf("</table>\n");
if (advanced) {
- printf("<input type=hidden name=\"Advanced\" value=1>\n");
+ d_printf("<input type=hidden name=\"Advanced\" value=1>\n");
}
- printf("</FORM>\n");
+ d_printf("</FORM>\n");
}
/****************************************************************************
@@ -569,7 +569,7 @@ static void shares_page(void)
if (share)
snum = lp_servicenumber(share);
- printf("<H2>Share Parameters</H2>\n");
+ d_printf("<H2>Share Parameters</H2>\n");
if (cgi_variable("Advanced") && !cgi_variable("Basic"))
advanced = 1;
@@ -594,62 +594,62 @@ static void shares_page(void)
snum = lp_servicenumber(share);
}
- printf("<FORM name=\"swatform\" method=post>\n");
+ d_printf("<FORM name=\"swatform\" method=post>\n");
- printf("<table>\n");
- printf("<tr>\n");
- printf("<td><input type=submit name=selectshare value=\"Choose Share\"></td>\n");
- printf("<td><select name=share>\n");
+ d_printf("<table>\n");
+ d_printf("<tr>\n");
+ d_printf("<td><input type=submit name=selectshare value=\"Choose Share\"></td>\n");
+ d_printf("<td><select name=share>\n");
if (snum < 0)
- printf("<option value=\" \"> \n");
+ d_printf("<option value=\" \"> \n");
for (i=0;i<lp_numservices();i++) {
s = lp_servicename(i);
if (s && (*s) && strcmp(s,"IPC$") && !lp_print_ok(i)) {
- printf("<option %s value=\"%s\">%s\n",
+ d_printf("<option %s value=\"%s\">%s\n",
(share && strcmp(share,s)==0)?"SELECTED":"",
s, s);
}
}
- printf("</select></td>\n");
+ d_printf("</select></td>\n");
if (have_write_access) {
- printf("<td><input type=submit name=\"Delete\" value=\"Delete Share\"></td>\n");
+ d_printf("<td><input type=submit name=\"Delete\" value=\"Delete Share\"></td>\n");
}
- printf("</tr>\n");
- printf("</table>");
- printf("<table>");
+ d_printf("</tr>\n");
+ d_printf("</table>");
+ d_printf("<table>");
if (have_write_access) {
- printf("<tr>\n");
- printf("<td><input type=submit name=createshare value=\"Create Share\"></td>\n");
- printf("<td><input type=text size=30 name=newshare></td></tr>\n");
+ d_printf("<tr>\n");
+ d_printf("<td><input type=submit name=createshare value=\"Create Share\"></td>\n");
+ d_printf("<td><input type=text size=30 name=newshare></td></tr>\n");
}
- printf("</table>");
+ d_printf("</table>");
if (snum >= 0) {
if (have_write_access) {
- printf("<input type=submit name=\"Commit\" value=\"Commit Changes\">\n");
+ d_printf("<input type=submit name=\"Commit\" value=\"Commit Changes\">\n");
}
- printf("<input type=reset name=\"Reset Values\" value=\"Reset Values\">\n");
+ d_printf("<input type=reset name=\"Reset Values\" value=\"Reset Values\">\n");
if (advanced == 0) {
- printf("<input type=submit name=\"Advanced\" value=\"Advanced View\">\n");
+ d_printf("<input type=submit name=\"Advanced\" value=\"Advanced View\">\n");
} else {
- printf("<input type=submit name=\"Basic\" value=\"Basic View\">\n");
+ d_printf("<input type=submit name=\"Basic\" value=\"Basic View\">\n");
}
- printf("<p>\n");
+ d_printf("<p>\n");
}
if (snum >= 0) {
- printf("<table>\n");
+ d_printf("<table>\n");
show_parameters(snum, 1, advanced, 0);
- printf("</table>\n");
+ d_printf("</table>\n");
}
if (advanced) {
- printf("<input type=hidden name=\"Advanced\" value=1>\n");
+ d_printf("<input type=hidden name=\"Advanced\" value=1>\n");
}
- printf("</FORM>\n");
+ d_printf("</FORM>\n");
}
/*************************************************************
@@ -664,7 +664,7 @@ static BOOL change_password(const char *remote_machine, char *user_name,
pstring msg_str;
if (demo_mode) {
- printf("password change in demo mode rejected\n<p>");
+ d_printf("password change in demo mode rejected\n<p>");
return False;
}
@@ -672,12 +672,12 @@ static BOOL change_password(const char *remote_machine, char *user_name,
ret = remote_password_change(remote_machine, user_name, old_passwd,
new_passwd, err_str, sizeof(err_str));
if(*err_str)
- printf("%s\n<p>", err_str);
+ d_printf("%s\n<p>", err_str);
return ret;
}
if(!initialize_password_db(True)) {
- printf("Can't setup password database vectors.\n<p>");
+ d_printf("Can't setup password database vectors.\n<p>");
return False;
}
@@ -685,9 +685,9 @@ static BOOL change_password(const char *remote_machine, char *user_name,
msg_str, sizeof(msg_str));
if(*msg_str)
- printf("%s\n<p>", msg_str);
+ d_printf("%s\n<p>", msg_str);
if(*err_str)
- printf("%s\n<p>", err_str);
+ d_printf("%s\n<p>", err_str);
return ret;
}
@@ -703,7 +703,7 @@ static void chg_passwd(void)
/* Make sure users name has been specified */
if (strlen(cgi_variable(SWAT_USER)) == 0) {
- printf("<p> Must specify \"User Name\" \n");
+ d_printf("<p> Must specify \"User Name\" \n");
return;
}
@@ -719,26 +719,26 @@ static void chg_passwd(void)
*/
if (((!am_root()) && (strlen( cgi_variable(OLD_PSWD)) <= 0)) ||
((cgi_variable(CHG_R_PASSWD_FLAG)) && (strlen( cgi_variable(OLD_PSWD)) <= 0))) {
- printf("<p> Must specify \"Old Password\" \n");
+ d_printf("<p> Must specify \"Old Password\" \n");
return;
}
/* If changing a users password on a remote hosts we have to know what host */
if ((cgi_variable(CHG_R_PASSWD_FLAG)) && (strlen( cgi_variable(RHOST)) <= 0)) {
- printf("<p> Must specify \"Remote Machine\" \n");
+ d_printf("<p> Must specify \"Remote Machine\" \n");
return;
}
/* Make sure new passwords have been specified */
if ((strlen( cgi_variable(NEW_PSWD)) <= 0) ||
(strlen( cgi_variable(NEW2_PSWD)) <= 0)) {
- printf("<p> Must specify \"New, and Re-typed Passwords\" \n");
+ d_printf("<p> Must specify \"New, and Re-typed Passwords\" \n");
return;
}
/* Make sure new passwords was typed correctly twice */
if (strcmp(cgi_variable(NEW_PSWD), cgi_variable(NEW2_PSWD)) != 0) {
- printf("<p> Re-typed password didn't match new password\n");
+ d_printf("<p> Re-typed password didn't match new password\n");
return;
}
}
@@ -767,9 +767,9 @@ static void chg_passwd(void)
if(local_flags == 0) {
if (rslt == True) {
- printf("<p> The passwd for '%s' has been changed. \n", cgi_variable(SWAT_USER));
+ d_printf("<p> The passwd for '%s' has been changed. \n", cgi_variable(SWAT_USER));
} else {
- printf("<p> The passwd for '%s' has NOT been changed. \n",cgi_variable(SWAT_USER));
+ d_printf("<p> The passwd for '%s' has NOT been changed. \n",cgi_variable(SWAT_USER));
}
}
@@ -793,43 +793,43 @@ static void passwd_page(void)
if (!new_name) new_name = "";
- printf("<H2>Server Password Management</H2>\n");
+ d_printf("<H2>Server Password Management</H2>\n");
- printf("<FORM name=\"swatform\" method=post>\n");
+ d_printf("<FORM name=\"swatform\" method=post>\n");
- printf("<table>\n");
+ d_printf("<table>\n");
/*
* Create all the dialog boxes for data collection
*/
- printf("<tr><td> User Name : </td>\n");
- printf("<td><input type=text size=30 name=%s value=%s></td></tr> \n", SWAT_USER, new_name);
+ d_printf("<tr><td> User Name : </td>\n");
+ d_printf("<td><input type=text size=30 name=%s value=%s></td></tr> \n", SWAT_USER, new_name);
if (!am_root()) {
- printf("<tr><td> Old Password : </td>\n");
- printf("<td><input type=password size=30 name=%s></td></tr> \n",OLD_PSWD);
+ d_printf("<tr><td> Old Password : </td>\n");
+ d_printf("<td><input type=password size=30 name=%s></td></tr> \n",OLD_PSWD);
}
- printf("<tr><td> New Password : </td>\n");
- printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW_PSWD);
- printf("<tr><td> Re-type New Password : </td>\n");
- printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW2_PSWD);
- printf("</table>\n");
+ d_printf("<tr><td> New Password : </td>\n");
+ d_printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW_PSWD);
+ d_printf("<tr><td> Re-type New Password : </td>\n");
+ d_printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW2_PSWD);
+ d_printf("</table>\n");
/*
* Create all the control buttons for requesting action
*/
- printf("<input type=submit name=%s value=\"Change Password\">\n",
+ d_printf("<input type=submit name=%s value=\"Change Password\">\n",
CHG_S_PASSWD_FLAG);
if (demo_mode || am_root()) {
- printf("<input type=submit name=%s value=\"Add New User\">\n",
+ d_printf("<input type=submit name=%s value=\"Add New User\">\n",
ADD_USER_FLAG);
- printf("<input type=submit name=%s value=\"Delete User\">\n",
+ d_printf("<input type=submit name=%s value=\"Delete User\">\n",
DELETE_USER_FLAG);
- printf("<input type=submit name=%s value=\"Disable User\">\n",
+ d_printf("<input type=submit name=%s value=\"Disable User\">\n",
DISABLE_USER_FLAG);
- printf("<input type=submit name=%s value=\"Enable User\">\n",
+ d_printf("<input type=submit name=%s value=\"Enable User\">\n",
ENABLE_USER_FLAG);
}
- printf("<p></FORM>\n");
+ d_printf("<p></FORM>\n");
/*
* Do some work if change, add, disable or enable was
@@ -840,35 +840,35 @@ static void passwd_page(void)
chg_passwd();
}
- printf("<H2>Client/Server Password Management</H2>\n");
+ d_printf("<H2>Client/Server Password Management</H2>\n");
- printf("<FORM name=\"swatform\" method=post>\n");
+ d_printf("<FORM name=\"swatform\" method=post>\n");
- printf("<table>\n");
+ d_printf("<table>\n");
/*
* Create all the dialog boxes for data collection
*/
- printf("<tr><td> User Name : </td>\n");
- printf("<td><input type=text size=30 name=%s value=%s></td></tr>\n",SWAT_USER, new_name);
- printf("<tr><td> Old Password : </td>\n");
- printf("<td><input type=password size=30 name=%s></td></tr>\n",OLD_PSWD);
- printf("<tr><td> New Password : </td>\n");
- printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW_PSWD);
- printf("<tr><td> Re-type New Password : </td>\n");
- printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW2_PSWD);
- printf("<tr><td> Remote Machine : </td>\n");
- printf("<td><input type=text size=30 name=%s></td></tr>\n",RHOST);
-
- printf("</table>");
+ d_printf("<tr><td> User Name : </td>\n");
+ d_printf("<td><input type=text size=30 name=%s value=%s></td></tr>\n",SWAT_USER, new_name);
+ d_printf("<tr><td> Old Password : </td>\n");
+ d_printf("<td><input type=password size=30 name=%s></td></tr>\n",OLD_PSWD);
+ d_printf("<tr><td> New Password : </td>\n");
+ d_printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW_PSWD);
+ d_printf("<tr><td> Re-type New Password : </td>\n");
+ d_printf("<td><input type=password size=30 name=%s></td></tr>\n",NEW2_PSWD);
+ d_printf("<tr><td> Remote Machine : </td>\n");
+ d_printf("<td><input type=text size=30 name=%s></td></tr>\n",RHOST);
+
+ d_printf("</table>");
/*
* Create all the control buttons for requesting action
*/
- printf("<input type=submit name=%s value=\"Change Password\">",
+ d_printf("<input type=submit name=%s value=\"Change Password\">",
CHG_R_PASSWD_FLAG);
- printf("<p></FORM>\n");
+ d_printf("<p></FORM>\n");
/*
* Do some work if a request has been made to change the
@@ -895,13 +895,13 @@ static void printers_page(void)
if (share)
snum = lp_servicenumber(share);
- printf("<H2>Printer Parameters</H2>\n");
+ d_printf("<H2>Printer Parameters</H2>\n");
- printf("<H3>Important Note:</H3>\n");
- printf("Printer names marked with [*] in the Choose Printer drop-down box ");
- printf("are autoloaded printers from ");
- printf("<A HREF=\"/swat/help/smb.conf.5.html#PRINTCAPNAME\" target=\"docs\">Printcap Name</A>.\n");
- printf("Attempting to delete these printers from SWAT will have no effect.\n");
+ d_printf("<H3>Important Note:</H3>\n");
+ d_printf("Printer names marked with [*] in the Choose Printer drop-down box ");
+ d_printf("are autoloaded printers from ");
+ d_printf("<A HREF=\"/swat/help/smb.conf.5.html#PRINTCAPNAME\" target=\"docs\">Printcap Name</A>.\n");
+ d_printf("Attempting to delete these printers from SWAT will have no effect.\n");
if (cgi_variable("Advanced") && !cgi_variable("Basic"))
advanced = 1;
@@ -931,65 +931,65 @@ static void printers_page(void)
snum = lp_servicenumber(share);
}
- printf("<FORM name=\"swatform\" method=post>\n");
+ d_printf("<FORM name=\"swatform\" method=post>\n");
- printf("<table>\n");
- printf("<tr><td><input type=submit name=selectshare value=\"Choose Printer\"></td>\n");
- printf("<td><select name=share>\n");
+ d_printf("<table>\n");
+ d_printf("<tr><td><input type=submit name=selectshare value=\"Choose Printer\"></td>\n");
+ d_printf("<td><select name=share>\n");
if (snum < 0 || !lp_print_ok(snum))
- printf("<option value=\" \"> \n");
+ d_printf("<option value=\" \"> \n");
for (i=0;i<lp_numservices();i++) {
s = lp_servicename(i);
if (s && (*s) && strcmp(s,"IPC$") && lp_print_ok(i)) {
if (i >= iNumNonAutoPrintServices)
- printf("<option %s value=\"%s\">[*]%s\n",
+ d_printf("<option %s value=\"%s\">[*]%s\n",
(share && strcmp(share,s)==0)?"SELECTED":"",
s, s);
else
- printf("<option %s value=\"%s\">%s\n",
+ d_printf("<option %s value=\"%s\">%s\n",
(share && strcmp(share,s)==0)?"SELECTED":"",
s, s);
}
}
- printf("</select></td>");
+ d_printf("</select></td>");
if (have_write_access) {
- printf("<td><input type=submit name=\"Delete\" value=\"Delete Printer\"></td>\n");
+ d_printf("<td><input type=submit name=\"Delete\" value=\"Delete Printer\"></td>\n");
}
- printf("</tr>");
- printf("</table>\n");
+ d_printf("</tr>");
+ d_printf("</table>\n");
if (have_write_access) {
- printf("<table>\n");
- printf("<tr><td><input type=submit name=createshare value=\"Create Printer\"></td>\n");
- printf("<td><input type=text size=30 name=newshare></td></tr>\n");
- printf("</table>");
+ d_printf("<table>\n");
+ d_printf("<tr><td><input type=submit name=createshare value=\"Create Printer\"></td>\n");
+ d_printf("<td><input type=text size=30 name=newshare></td></tr>\n");
+ d_printf("</table>");
}
if (snum >= 0) {
if (have_write_access) {
- printf("<input type=submit name=\"Commit\" value=\"Commit Changes\">\n");
+ d_printf("<input type=submit name=\"Commit\" value=\"Commit Changes\">\n");
}
- printf("<input type=reset name=\"Reset Values\" value=\"Reset Values\">\n");
+ d_printf("<input type=reset name=\"Reset Values\" value=\"Reset Values\">\n");
if (advanced == 0) {
- printf("<input type=submit name=\"Advanced\" value=\"Advanced View\">\n");
+ d_printf("<input type=submit name=\"Advanced\" value=\"Advanced View\">\n");
} else {
- printf("<input type=submit name=\"Basic\" value=\"Basic View\">\n");
+ d_printf("<input type=submit name=\"Basic\" value=\"Basic View\">\n");
}
- printf("<p>\n");
+ d_printf("<p>\n");
}
if (snum >= 0) {
- printf("<table>\n");
+ d_printf("<table>\n");
show_parameters(snum, 1, advanced, 1);
- printf("</table>\n");
+ d_printf("</table>\n");
}
if (advanced) {
- printf("<input type=hidden name=\"Advanced\" value=1>\n");
+ d_printf("<input type=hidden name=\"Advanced\" value=1>\n");
}
- printf("</FORM>\n");
+ d_printf("</FORM>\n");
}
/****************************************************************************