1999-04-01 09:35:22 +04:00
/*
2002-01-30 09:08:46 +03:00
Unix SMB / CIFS implementation .
1999-04-01 09:35:22 +04:00
store smbd profiling information in shared memory
Copyright ( C ) Andrew Tridgell 1999
2006-07-11 22:01:26 +04:00
Copyright ( C ) James Peach 2006
1999-04-01 09:35:22 +04:00
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
2007-07-09 23:25:36 +04:00
the Free Software Foundation ; either version 3 of the License , or
1999-04-01 09:35:22 +04:00
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
2007-07-10 04:52:41 +04:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
1999-04-01 09:35:22 +04:00
*/
# include "includes.h"
2011-04-14 02:04:08 +04:00
# include "system/shmem.h"
2011-04-15 14:39:15 +04:00
# include "system/filesys.h"
2011-03-24 17:31:06 +03:00
# include "messages.h"
2011-04-14 02:36:23 +04:00
# include "smbprofile.h"
1999-04-01 09:35:22 +04:00
2002-09-25 19:19:00 +04:00
# ifdef WITH_PROFILE
2004-12-19 03:31:31 +03:00
# define IPC_PERMS ((S_IRUSR | S_IWUSR) | S_IRGRP | S_IROTH)
2002-09-25 19:19:00 +04:00
# endif /* WITH_PROFILE */
1999-04-01 09:35:22 +04:00
2002-09-25 19:19:00 +04:00
# ifdef WITH_PROFILE
1999-04-01 09:35:22 +04:00
static int shm_id ;
2007-10-19 04:40:25 +04:00
static bool read_only ;
2006-05-08 07:20:49 +04:00
# endif
1999-04-01 09:35:22 +04:00
2000-10-11 09:31:39 +04:00
struct profile_header * profile_h ;
struct profile_stats * profile_p ;
1999-04-01 09:35:22 +04:00
2007-10-19 04:40:25 +04:00
bool do_profile_flag = False ;
bool do_profile_times = False ;
2000-10-06 22:13:52 +04:00
2000-10-07 03:01:47 +04:00
/****************************************************************************
2007-04-20 05:52:44 +04:00
Set a profiling level .
2000-10-07 03:01:47 +04:00
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2007-05-07 13:35:35 +04:00
void set_profile_level ( int level , struct server_id src )
2000-10-07 03:01:47 +04:00
{
2002-09-25 19:19:00 +04:00
# ifdef WITH_PROFILE
2000-10-07 03:01:47 +04:00
switch ( level ) {
2000-10-11 09:31:39 +04:00
case 0 : /* turn off profiling */
2000-10-07 03:01:47 +04:00
do_profile_flag = False ;
do_profile_times = False ;
2005-12-25 12:49:10 +03:00
DEBUG ( 1 , ( " INFO: Profiling turned OFF from pid %d \n " ,
2005-12-25 13:06:05 +03:00
( int ) procid_to_pid ( & src ) ) ) ;
2000-10-07 03:01:47 +04:00
break ;
2000-10-11 09:31:39 +04:00
case 1 : /* turn on counter profiling only */
2000-10-07 03:01:47 +04:00
do_profile_flag = True ;
do_profile_times = False ;
2005-12-25 12:49:10 +03:00
DEBUG ( 1 , ( " INFO: Profiling counts turned ON from pid %d \n " ,
2005-12-25 13:06:05 +03:00
( int ) procid_to_pid ( & src ) ) ) ;
2000-10-07 03:01:47 +04:00
break ;
2000-10-11 09:31:39 +04:00
case 2 : /* turn on complete profiling */
2000-10-07 03:01:47 +04:00
do_profile_flag = True ;
do_profile_times = True ;
2005-12-25 12:49:10 +03:00
DEBUG ( 1 , ( " INFO: Full profiling turned ON from pid %d \n " ,
2005-12-25 13:06:05 +03:00
( int ) procid_to_pid ( & src ) ) ) ;
2000-10-07 03:01:47 +04:00
break ;
2000-10-11 09:31:39 +04:00
case 3 : /* reset profile values */
memset ( ( char * ) profile_p , 0 , sizeof ( * profile_p ) ) ;
2005-12-25 12:49:10 +03:00
DEBUG ( 1 , ( " INFO: Profiling values cleared from pid %d \n " ,
2005-12-25 13:06:05 +03:00
( int ) procid_to_pid ( & src ) ) ) ;
2000-10-11 09:31:39 +04:00
break ;
2000-10-07 03:01:47 +04:00
}
2002-09-25 19:19:00 +04:00
# else /* WITH_PROFILE */
DEBUG ( 1 , ( " INFO: Profiling support unavailable in this build. \n " ) ) ;
# endif /* WITH_PROFILE */
2000-10-07 03:01:47 +04:00
}
2007-07-16 18:19:59 +04:00
# ifdef WITH_PROFILE
2007-04-20 05:52:44 +04:00
/****************************************************************************
receive a set profile level message
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2007-05-15 16:18:17 +04:00
static void profile_message ( struct messaging_context * msg_ctx ,
void * private_data ,
uint32_t msg_type ,
struct server_id src ,
DATA_BLOB * data )
2007-04-20 05:52:44 +04:00
{
int level ;
2007-05-15 16:18:17 +04:00
if ( data - > length ! = sizeof ( level ) ) {
DEBUG ( 0 , ( " got invalid profile message \n " ) ) ;
return ;
}
memcpy ( & level , data - > data , sizeof ( level ) ) ;
2007-04-20 05:52:44 +04:00
set_profile_level ( level , src ) ;
}
2000-11-11 03:33:33 +03:00
/****************************************************************************
receive a request profile level message
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2007-05-15 16:18:17 +04:00
static void reqprofile_message ( struct messaging_context * msg_ctx ,
void * private_data ,
uint32_t msg_type ,
struct server_id src ,
DATA_BLOB * data )
2000-11-11 03:33:33 +03:00
{
int level ;
# ifdef WITH_PROFILE
level = 1 + ( do_profile_flag ? 2 : 0 ) + ( do_profile_times ? 4 : 0 ) ;
# else
level = 0 ;
# endif
2005-09-30 21:13:37 +04:00
DEBUG ( 1 , ( " INFO: Received REQ_PROFILELEVEL message from PID %u \n " ,
( unsigned int ) procid_to_pid ( & src ) ) ) ;
2007-05-15 16:18:17 +04:00
messaging_send_buf ( msg_ctx , src , MSG_PROFILELEVEL ,
( uint8 * ) & level , sizeof ( level ) ) ;
2000-11-11 03:33:33 +03:00
}
1999-04-01 09:35:22 +04:00
/*******************************************************************
open the profiling shared memory area
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2007-10-19 04:40:25 +04:00
bool profile_setup ( struct messaging_context * msg_ctx , bool rdonly )
1999-04-01 09:35:22 +04:00
{
struct shmid_ds shm_ds ;
read_only = rdonly ;
again :
/* try to use an existing key */
1999-12-13 16:27:58 +03:00
shm_id = shmget ( PROF_SHMEM_KEY , 0 , 0 ) ;
1999-04-01 09:35:22 +04:00
/* if that failed then create one. There is a race condition here
if we are running from inetd . Bad luck . */
if ( shm_id = = - 1 ) {
if ( read_only ) return False ;
2000-10-11 09:31:39 +04:00
shm_id = shmget ( PROF_SHMEM_KEY , sizeof ( * profile_h ) ,
1999-04-01 09:35:22 +04:00
IPC_CREAT | IPC_EXCL | IPC_PERMS ) ;
}
if ( shm_id = = - 1 ) {
DEBUG ( 0 , ( " Can't create or use IPC area. Error was %s \n " ,
strerror ( errno ) ) ) ;
return False ;
}
2000-10-11 09:31:39 +04:00
profile_h = ( struct profile_header * ) shmat ( shm_id , 0 ,
1999-04-01 09:35:22 +04:00
read_only ? SHM_RDONLY : 0 ) ;
2009-09-08 19:38:37 +04:00
if ( ( long ) profile_h = = - 1 ) {
1999-04-01 09:35:22 +04:00
DEBUG ( 0 , ( " Can't attach to IPC area. Error was %s \n " ,
strerror ( errno ) ) ) ;
return False ;
}
/* find out who created this memory area */
if ( shmctl ( shm_id , IPC_STAT , & shm_ds ) ! = 0 ) {
DEBUG ( 0 , ( " ERROR shmctl : can't IPC_STAT. Error was %s \n " ,
strerror ( errno ) ) ) ;
return False ;
}
2006-05-11 02:33:10 +04:00
if ( shm_ds . shm_perm . cuid ! = sec_initial_uid ( ) | |
shm_ds . shm_perm . cgid ! = sec_initial_gid ( ) ) {
DEBUG ( 0 , ( " ERROR: we did not create the shmem "
" (owned by another user, uid %u, gid %u) \n " ,
shm_ds . shm_perm . cuid ,
shm_ds . shm_perm . cgid ) ) ;
1999-04-01 09:35:22 +04:00
return False ;
}
2000-10-11 09:31:39 +04:00
if ( shm_ds . shm_segsz ! = sizeof ( * profile_h ) ) {
2007-05-15 16:18:17 +04:00
DEBUG ( 0 , ( " WARNING: profile size is %d (expected %d). Deleting \n " ,
2007-08-31 19:01:50 +04:00
( int ) shm_ds . shm_segsz , ( int ) sizeof ( * profile_h ) ) ) ;
1999-04-01 09:35:22 +04:00
if ( shmctl ( shm_id , IPC_RMID , & shm_ds ) = = 0 ) {
goto again ;
} else {
return False ;
}
}
if ( ! read_only & & ( shm_ds . shm_nattch = = 1 ) ) {
2000-10-11 09:31:39 +04:00
memset ( ( char * ) profile_h , 0 , sizeof ( * profile_h ) ) ;
profile_h - > prof_shm_magic = PROF_SHM_MAGIC ;
profile_h - > prof_shm_version = PROF_SHM_VERSION ;
1999-04-01 09:35:22 +04:00
DEBUG ( 3 , ( " Initialised profile area \n " ) ) ;
}
2000-10-11 09:31:39 +04:00
profile_p = & profile_h - > stats ;
2007-05-15 16:18:17 +04:00
if ( msg_ctx ! = NULL ) {
messaging_register ( msg_ctx , NULL , MSG_PROFILE ,
profile_message ) ;
messaging_register ( msg_ctx , NULL , MSG_REQ_PROFILELEVEL ,
reqprofile_message ) ;
}
1999-04-01 09:35:22 +04:00
return True ;
}
2006-07-11 22:01:26 +04:00
const char * profile_value_name ( enum profile_stats_values val )
{
static const char * valnames [ PR_VALUE_MAX + 1 ] =
{
" smbd_idle " , /* PR_VALUE_SMBD_IDLE */
" syscall_opendir " , /* PR_VALUE_SYSCALL_OPENDIR */
" syscall_readdir " , /* PR_VALUE_SYSCALL_READDIR */
" syscall_seekdir " , /* PR_VALUE_SYSCALL_SEEKDIR */
" syscall_telldir " , /* PR_VALUE_SYSCALL_TELLDIR */
" syscall_rewinddir " , /* PR_VALUE_SYSCALL_REWINDDIR */
" syscall_mkdir " , /* PR_VALUE_SYSCALL_MKDIR */
" syscall_rmdir " , /* PR_VALUE_SYSCALL_RMDIR */
" syscall_closedir " , /* PR_VALUE_SYSCALL_CLOSEDIR */
" syscall_open " , /* PR_VALUE_SYSCALL_OPEN */
2009-02-23 21:24:33 +03:00
" syscall_createfile " , /* PR_VALUE_SYSCALL_CREATEFILE */
2006-07-11 22:01:26 +04:00
" syscall_close " , /* PR_VALUE_SYSCALL_CLOSE */
" syscall_read " , /* PR_VALUE_SYSCALL_READ */
" syscall_pread " , /* PR_VALUE_SYSCALL_PREAD */
" syscall_write " , /* PR_VALUE_SYSCALL_WRITE */
" syscall_pwrite " , /* PR_VALUE_SYSCALL_PWRITE */
" syscall_lseek " , /* PR_VALUE_SYSCALL_LSEEK */
" syscall_sendfile " , /* PR_VALUE_SYSCALL_SENDFILE */
2007-10-30 03:16:13 +03:00
" syscall_recvfile " , /* PR_VALUE_SYSCALL_RECVFILE */
2006-07-11 22:01:26 +04:00
" syscall_rename " , /* PR_VALUE_SYSCALL_RENAME */
2009-02-23 21:24:33 +03:00
" syscall_rename_at " , /* PR_VALUE_SYSCALL_RENAME_AT */
2006-07-11 22:01:26 +04:00
" syscall_fsync " , /* PR_VALUE_SYSCALL_FSYNC */
" syscall_stat " , /* PR_VALUE_SYSCALL_STAT */
" syscall_fstat " , /* PR_VALUE_SYSCALL_FSTAT */
" syscall_lstat " , /* PR_VALUE_SYSCALL_LSTAT */
" syscall_unlink " , /* PR_VALUE_SYSCALL_UNLINK */
" syscall_chmod " , /* PR_VALUE_SYSCALL_CHMOD */
" syscall_fchmod " , /* PR_VALUE_SYSCALL_FCHMOD */
" syscall_chown " , /* PR_VALUE_SYSCALL_CHOWN */
" syscall_fchown " , /* PR_VALUE_SYSCALL_FCHOWN */
" syscall_chdir " , /* PR_VALUE_SYSCALL_CHDIR */
" syscall_getwd " , /* PR_VALUE_SYSCALL_GETWD */
2007-03-06 02:40:03 +03:00
" syscall_ntimes " , /* PR_VALUE_SYSCALL_NTIMES */
2006-07-11 22:01:26 +04:00
" syscall_ftruncate " , /* PR_VALUE_SYSCALL_FTRUNCATE */
2010-12-18 10:08:01 +03:00
" syscall_fallocate " , /* PR_VALUE_SYSCALL_FALLOCATE */
2006-07-11 22:01:26 +04:00
" syscall_fcntl_lock " , /* PR_VALUE_SYSCALL_FCNTL_LOCK */
2006-11-09 23:29:31 +03:00
" syscall_kernel_flock " , /* PR_VALUE_SYSCALL_KERNEL_FLOCK */
2007-02-14 05:37:14 +03:00
" syscall_linux_setlease " , /* PR_VALUE_SYSCALL_LINUX_SETLEASE */
2006-07-11 22:01:26 +04:00
" syscall_fcntl_getlock " , /* PR_VALUE_SYSCALL_FCNTL_GETLOCK */
" syscall_readlink " , /* PR_VALUE_SYSCALL_READLINK */
" syscall_symlink " , /* PR_VALUE_SYSCALL_SYMLINK */
" syscall_link " , /* PR_VALUE_SYSCALL_LINK */
" syscall_mknod " , /* PR_VALUE_SYSCALL_MKNOD */
" syscall_realpath " , /* PR_VALUE_SYSCALL_REALPATH */
" syscall_get_quota " , /* PR_VALUE_SYSCALL_GET_QUOTA */
" syscall_set_quota " , /* PR_VALUE_SYSCALL_SET_QUOTA */
2009-02-23 21:24:33 +03:00
" syscall_get_sd " , /* PR_VALUE_SYSCALL_GET_SD */
" syscall_set_sd " , /* PR_VALUE_SYSCALL_SET_SD */
" syscall_brl_lock " , /* PR_VALUE_SYSCALL_BRL_LOCK */
" syscall_brl_unlock " , /* PR_VALUE_SYSCALL_BRL_UNLOCK */
" syscall_brl_cancel " , /* PR_VALUE_SYSCALL_BRL_CANCEL */
2006-07-11 22:01:26 +04:00
" SMBmkdir " , /* PR_VALUE_SMBMKDIR */
" SMBrmdir " , /* PR_VALUE_SMBRMDIR */
" SMBopen " , /* PR_VALUE_SMBOPEN */
" SMBcreate " , /* PR_VALUE_SMBCREATE */
" SMBclose " , /* PR_VALUE_SMBCLOSE */
" SMBflush " , /* PR_VALUE_SMBFLUSH */
" SMBunlink " , /* PR_VALUE_SMBUNLINK */
" SMBmv " , /* PR_VALUE_SMBMV */
" SMBgetatr " , /* PR_VALUE_SMBGETATR */
" SMBsetatr " , /* PR_VALUE_SMBSETATR */
" SMBread " , /* PR_VALUE_SMBREAD */
" SMBwrite " , /* PR_VALUE_SMBWRITE */
" SMBlock " , /* PR_VALUE_SMBLOCK */
" SMBunlock " , /* PR_VALUE_SMBUNLOCK */
" SMBctemp " , /* PR_VALUE_SMBCTEMP */
" SMBmknew " , /* PR_VALUE_SMBMKNEW */
2007-01-14 01:26:46 +03:00
" SMBcheckpath " , /* PR_VALUE_SMBCHECKPATH */
2006-07-11 22:01:26 +04:00
" SMBexit " , /* PR_VALUE_SMBEXIT */
" SMBlseek " , /* PR_VALUE_SMBLSEEK */
" SMBlockread " , /* PR_VALUE_SMBLOCKREAD */
" SMBwriteunlock " , /* PR_VALUE_SMBWRITEUNLOCK */
" SMBreadbraw " , /* PR_VALUE_SMBREADBRAW */
" SMBreadBmpx " , /* PR_VALUE_SMBREADBMPX */
" SMBreadBs " , /* PR_VALUE_SMBREADBS */
" SMBwritebraw " , /* PR_VALUE_SMBWRITEBRAW */
" SMBwriteBmpx " , /* PR_VALUE_SMBWRITEBMPX */
" SMBwriteBs " , /* PR_VALUE_SMBWRITEBS */
" SMBwritec " , /* PR_VALUE_SMBWRITEC */
" SMBsetattrE " , /* PR_VALUE_SMBSETATTRE */
" SMBgetattrE " , /* PR_VALUE_SMBGETATTRE */
" SMBlockingX " , /* PR_VALUE_SMBLOCKINGX */
" SMBtrans " , /* PR_VALUE_SMBTRANS */
" SMBtranss " , /* PR_VALUE_SMBTRANSS */
" SMBioctl " , /* PR_VALUE_SMBIOCTL */
" SMBioctls " , /* PR_VALUE_SMBIOCTLS */
" SMBcopy " , /* PR_VALUE_SMBCOPY */
" SMBmove " , /* PR_VALUE_SMBMOVE */
" SMBecho " , /* PR_VALUE_SMBECHO */
" SMBwriteclose " , /* PR_VALUE_SMBWRITECLOSE */
" SMBopenX " , /* PR_VALUE_SMBOPENX */
" SMBreadX " , /* PR_VALUE_SMBREADX */
" SMBwriteX " , /* PR_VALUE_SMBWRITEX */
" SMBtrans2 " , /* PR_VALUE_SMBTRANS2 */
" SMBtranss2 " , /* PR_VALUE_SMBTRANSS2 */
" SMBfindclose " , /* PR_VALUE_SMBFINDCLOSE */
" SMBfindnclose " , /* PR_VALUE_SMBFINDNCLOSE */
" SMBtcon " , /* PR_VALUE_SMBTCON */
" SMBtdis " , /* PR_VALUE_SMBTDIS */
" SMBnegprot " , /* PR_VALUE_SMBNEGPROT */
" SMBsesssetupX " , /* PR_VALUE_SMBSESSSETUPX */
" SMBulogoffX " , /* PR_VALUE_SMBULOGOFFX */
" SMBtconX " , /* PR_VALUE_SMBTCONX */
" SMBdskattr " , /* PR_VALUE_SMBDSKATTR */
" SMBsearch " , /* PR_VALUE_SMBSEARCH */
" SMBffirst " , /* PR_VALUE_SMBFFIRST */
" SMBfunique " , /* PR_VALUE_SMBFUNIQUE */
" SMBfclose " , /* PR_VALUE_SMBFCLOSE */
" SMBnttrans " , /* PR_VALUE_SMBNTTRANS */
" SMBnttranss " , /* PR_VALUE_SMBNTTRANSS */
" SMBntcreateX " , /* PR_VALUE_SMBNTCREATEX */
" SMBntcancel " , /* PR_VALUE_SMBNTCANCEL */
" SMBntrename " , /* PR_VALUE_SMBNTRENAME */
" SMBsplopen " , /* PR_VALUE_SMBSPLOPEN */
" SMBsplwr " , /* PR_VALUE_SMBSPLWR */
" SMBsplclose " , /* PR_VALUE_SMBSPLCLOSE */
" SMBsplretq " , /* PR_VALUE_SMBSPLRETQ */
" SMBsends " , /* PR_VALUE_SMBSENDS */
" SMBsendb " , /* PR_VALUE_SMBSENDB */
" SMBfwdname " , /* PR_VALUE_SMBFWDNAME */
" SMBcancelf " , /* PR_VALUE_SMBCANCELF */
" SMBgetmac " , /* PR_VALUE_SMBGETMAC */
" SMBsendstrt " , /* PR_VALUE_SMBSENDSTRT */
" SMBsendend " , /* PR_VALUE_SMBSENDEND */
" SMBsendtxt " , /* PR_VALUE_SMBSENDTXT */
" SMBinvalid " , /* PR_VALUE_SMBINVALID */
" pathworks_setdir " , /* PR_VALUE_PATHWORKS_SETDIR */
" Trans2_open " , /* PR_VALUE_TRANS2_OPEN */
" Trans2_findfirst " , /* PR_VALUE_TRANS2_FINDFIRST */
" Trans2_findnext " , /* PR_VALUE_TRANS2_FINDNEXT */
" Trans2_qfsinfo " , /* PR_VALUE_TRANS2_QFSINFO */
" Trans2_setfsinfo " , /* PR_VALUE_TRANS2_SETFSINFO */
" Trans2_qpathinfo " , /* PR_VALUE_TRANS2_QPATHINFO */
" Trans2_setpathinfo " , /* PR_VALUE_TRANS2_SETPATHINFO */
" Trans2_qfileinfo " , /* PR_VALUE_TRANS2_QFILEINFO */
" Trans2_setfileinfo " , /* PR_VALUE_TRANS2_SETFILEINFO */
" Trans2_fsctl " , /* PR_VALUE_TRANS2_FSCTL */
" Trans2_ioctl " , /* PR_VALUE_TRANS2_IOCTL */
" Trans2_findnotifyfirst " , /* PR_VALUE_TRANS2_FINDNOTIFYFIRST */
" Trans2_findnotifynext " , /* PR_VALUE_TRANS2_FINDNOTIFYNEXT */
" Trans2_mkdir " , /* PR_VALUE_TRANS2_MKDIR */
" Trans2_session_setup " , /* PR_VALUE_TRANS2_SESSION_SETUP */
" Trans2_get_dfs_referral " , /* PR_VALUE_TRANS2_GET_DFS_REFERRAL */
" Trans2_report_dfs_inconsistancy " , /* PR_VALUE_TRANS2_REPORT_DFS_INCONSISTANCY */
" NT_transact_create " , /* PR_VALUE_NT_TRANSACT_CREATE */
" NT_transact_ioctl " , /* PR_VALUE_NT_TRANSACT_IOCTL */
" NT_transact_set_security_desc " , /* PR_VALUE_NT_TRANSACT_SET_SECURITY_DESC */
" NT_transact_notify_change " , /* PR_VALUE_NT_TRANSACT_NOTIFY_CHANGE */
" NT_transact_rename " , /* PR_VALUE_NT_TRANSACT_RENAME */
" NT_transact_query_security_desc " , /* PR_VALUE_NT_TRANSACT_QUERY_SECURITY_DESC */
" NT_transact_get_user_quota " , /* PR_VALUE_NT_TRANSACT_GET_USER_QUOTA */
" NT_transact_set_user_quota " , /* PR_VALUE_NT_TRANSACT_SET_USER_QUOTA */
" get_nt_acl " , /* PR_VALUE_GET_NT_ACL */
" fget_nt_acl " , /* PR_VALUE_FGET_NT_ACL */
" fset_nt_acl " , /* PR_VALUE_FSET_NT_ACL */
" chmod_acl " , /* PR_VALUE_CHMOD_ACL */
" fchmod_acl " , /* PR_VALUE_FCHMOD_ACL */
" name_release " , /* PR_VALUE_NAME_RELEASE */
" name_refresh " , /* PR_VALUE_NAME_REFRESH */
" name_registration " , /* PR_VALUE_NAME_REGISTRATION */
" node_status " , /* PR_VALUE_NODE_STATUS */
" name_query " , /* PR_VALUE_NAME_QUERY */
" host_announce " , /* PR_VALUE_HOST_ANNOUNCE */
" workgroup_announce " , /* PR_VALUE_WORKGROUP_ANNOUNCE */
" local_master_announce " , /* PR_VALUE_LOCAL_MASTER_ANNOUNCE */
" master_browser_announce " , /* PR_VALUE_MASTER_BROWSER_ANNOUNCE */
" lm_host_announce " , /* PR_VALUE_LM_HOST_ANNOUNCE */
" get_backup_list " , /* PR_VALUE_GET_BACKUP_LIST */
" reset_browser " , /* PR_VALUE_RESET_BROWSER */
" announce_request " , /* PR_VALUE_ANNOUNCE_REQUEST */
" lm_announce_request " , /* PR_VALUE_LM_ANNOUNCE_REQUEST */
" domain_logon " , /* PR_VALUE_DOMAIN_LOGON */
" sync_browse_lists " , /* PR_VALUE_SYNC_BROWSE_LISTS */
" run_elections " , /* PR_VALUE_RUN_ELECTIONS */
" election " , /* PR_VALUE_ELECTION */
2010-07-02 01:51:41 +04:00
" smb2_negprot " , /* PR_VALUE_SMB2_NEGPROT */
" smb2_sesssetup " , /* PR_VALUE_SMB2_SESSETUP */
" smb2_logoff " , /* PR_VALUE_SMB2_LOGOFF */
" smb2_tcon " , /* PR_VALUE_SMB2_TCON */
" smb2_tdis " , /* PR_VALUE_SMB2_TDIS */
" smb2_create " , /* PR_VALUE_SMB2_CREATE */
" smb2_close " , /* PR_VALUE_SMB2_CLOSE */
" smb2_flush " , /* PR_VALUE_SMB2_FLUSH */
" smb2_read " , /* PR_VALUE_SMB2_READ */
" smb2_write " , /* PR_VALUE_SMB2_WRITE */
" smb2_lock " , /* PR_VALUE_SMB2_LOCK */
" smb2_ioctl " , /* PR_VALUE_SMB2_IOCTL */
" smb2_cancel " , /* PR_VALUE_SMB2_CANCEL */
" smb2_keepalive " , /* PR_VALUE_SMB2_KEEPALIVE */
" smb2_find " , /* PR_VALUE_SMB2_FIND */
" smb2_notify " , /* PR_VALUE_SMB2_NOTIFY */
" smb2_getinfo " , /* PR_VALUE_SMB2_GETINFO */
" smb2_setinfo " /* PR_VALUE_SMB2_SETINFO */
" smb2_break " , /* PR_VALUE_SMB2_BREAK */
2006-07-11 22:01:26 +04:00
" " /* PR_VALUE_MAX */
} ;
SMB_ASSERT ( val > = 0 ) ;
SMB_ASSERT ( val < PR_VALUE_MAX ) ;
return valnames [ val ] ;
}
2002-09-25 19:19:00 +04:00
# endif /* WITH_PROFILE */