列挙型 | |
enum | todo_values { NOOP_QUOTA = 0, FS_QUOTA, USER_QUOTA, LIST_QUOTA, SET_QUOTA } |
enum | exit_values { EXIT_OK, EXIT_FAILED, EXIT_PARSE_ERROR } |
enum | { PARSE_FLAGS, PARSE_LIM } |
関数 | |
static struct cli_state * | connect_one (const char *share) |
static BOOL | cli_open_policy_hnd (void) |
static void | SidToString (fstring str, DOM_SID *sid, BOOL _numeric) |
static BOOL | StringToSid (DOM_SID *sid, const char *str) |
static int | parse_quota_set (pstring set_str, pstring username_str, enum SMB_QUOTA_TYPE *qtype, int *cmd, SMB_NTQUOTA_STRUCT *pqt) |
変数 | |
static pstring | server |
static BOOL | numeric |
static BOOL | verbose |
static struct cli_state * | cli_ipc |
static struct rpc_pipe_client * | global_pipe_hnd |
static POLICY_HND | pol |
static BOOL | got_policy_hnd |
enum todo_values |
enum exit_values |
anonymous enum |
static struct cli_state* connect_one | ( | const char * | share | ) | [static] |
static BOOL cli_open_policy_hnd | ( | void | ) | [static] |
smbcquotas.c の 46 行で定義されています。
参照先 cli_ipc・cli_rpc_pipe_open_noauth()・connect_one()・global_pipe_hnd・got_policy_hnd・cli_state::mem_ctx・pol・rpccli_lsa_open_policy().
参照元 SidToString()・StringToSid().
00047 { 00048 /* Initialise cli LSA connection */ 00049 00050 if (!cli_ipc) { 00051 NTSTATUS ret; 00052 cli_ipc = connect_one("IPC$"); 00053 global_pipe_hnd = cli_rpc_pipe_open_noauth(cli_ipc, PI_LSARPC, &ret); 00054 if (!global_pipe_hnd) { 00055 return False; 00056 } 00057 } 00058 00059 /* Open policy handle */ 00060 00061 if (!got_policy_hnd) { 00062 00063 /* Some systems don't support SEC_RIGHTS_MAXIMUM_ALLOWED, 00064 but NT sends 0x2000000 so we might as well do it too. */ 00065 00066 if (!NT_STATUS_IS_OK(rpccli_lsa_open_policy(global_pipe_hnd, cli_ipc->mem_ctx, True, 00067 GENERIC_EXECUTE_ACCESS, &pol))) { 00068 return False; 00069 } 00070 00071 got_policy_hnd = True; 00072 } 00073 00074 return True; 00075 }
smbcquotas.c の 78 行で定義されています。
参照先 cli_ipc・cli_open_policy_hnd()・global_pipe_hnd・cli_state::mem_ctx・pol・rpccli_lsa_lookup_sids()・sid_to_string().
00079 { 00080 char **domains = NULL; 00081 char **names = NULL; 00082 enum lsa_SidType *types = NULL; 00083 00084 sid_to_string(str, sid); 00085 00086 if (_numeric) return; 00087 00088 /* Ask LSA to convert the sid to a name */ 00089 00090 if (!cli_open_policy_hnd() || 00091 !NT_STATUS_IS_OK(rpccli_lsa_lookup_sids(global_pipe_hnd, cli_ipc->mem_ctx, 00092 &pol, 1, sid, &domains, 00093 &names, &types)) || 00094 !domains || !domains[0] || !names || !names[0]) { 00095 return; 00096 } 00097 00098 /* Converted OK */ 00099 00100 slprintf(str, sizeof(fstring) - 1, "%s%s%s", 00101 domains[0], lp_winbind_separator(), 00102 names[0]); 00103 00104 }
smbcquotas.c の 107 行で定義されています。
参照先 cli_ipc・cli_open_policy_hnd()・global_pipe_hnd・cli_state::mem_ctx・pol・result・rpccli_lsa_lookup_names()・sid_copy()・string_to_sid().
00108 { 00109 enum lsa_SidType *types = NULL; 00110 DOM_SID *sids = NULL; 00111 BOOL result = True; 00112 00113 if (strncmp(str, "S-", 2) == 0) { 00114 return string_to_sid(sid, str); 00115 } 00116 00117 if (!cli_open_policy_hnd() || 00118 !NT_STATUS_IS_OK(rpccli_lsa_lookup_names(global_pipe_hnd, cli_ipc->mem_ctx, 00119 &pol, 1, &str, NULL, &sids, 00120 &types))) { 00121 result = False; 00122 goto done; 00123 } 00124 00125 sid_copy(sid, &sids[0]); 00126 done: 00127 00128 return result; 00129 }
static int parse_quota_set | ( | pstring | set_str, | |
pstring | username_str, | |||
enum SMB_QUOTA_TYPE * | qtype, | |||
int * | cmd, | |||
SMB_NTQUOTA_STRUCT * | pqt | |||
) | [static] |
smbcquotas.c の 138 行で定義されています。
参照先 all_string_sub()・c・cli・cli_close()・cli_errstr()・cli_full_connection()・cli_get_fs_attr_info()・cli_get_fs_quota_info()・cli_get_quota_handle()・cli_get_user_quota()・cli_list_user_quota()・cli_set_fs_quota_info()・cli_set_user_quota()・cmdline_auth_info・connect_one()・d_printf()・dbf・DEBUGLEVEL_CLASS・dump_ntquota()・dump_ntquota_list()・dyn_CONFIGFILE・EXIT_FAILED・EXIT_OK・EXIT_PARSE_ERROR・fault_setup()・free_ntquota_list()・FS_QUOTA・global_myname・user_auth_info::got_pass・_SMB_NTQUOTA_STRUCT::hardlim・LIST_QUOTA・load_case_tables()・load_interfaces()・lp_workgroup()・main()・nt_errstr()・numeric・PARSE_FLAGS・PARSE_LIM・user_auth_info::password・poptGetArg()・poptGetContext()・poptGetNextOpt()・poptGetOptArg()・poptPeekArg()・poptPrintUsage()・poptSetOtherOptionHelp()・printf()・_SMB_NTQUOTA_STRUCT::qflags・result・server・SET_QUOTA・setup_logging()・share・_SMB_NTQUOTA_STRUCT::sid・SidToString()・user_auth_info::signing_state・SMB_INVALID_QUOTA_TYPE・SMB_USER_FS_QUOTA_TYPE・SMB_USER_QUOTA_TYPE・_SMB_NTQUOTA_STRUCT::softlim・strchr_m()・StringToSid()・strnequal()・test_args・USER_QUOTA・user_auth_info::username・verbose・x_setbuf()・x_stderr・zero_ip().
smbcquotas.c の 27 行で定義されています。
smbcquotas.c の 31 行で定義されています。
smbcquotas.c の 32 行で定義されています。
smbcquotas.c の 37 行で定義されています。
参照元 cli_open_policy_hnd()・cli_resolve_path()・SidToString()・StringToSid().
struct rpc_pipe_client* global_pipe_hnd [static] |
smbcquotas.c の 38 行で定義されています。
POLICY_HND pol [static] |
smbcquotas.c の 39 行で定義されています。
BOOL got_policy_hnd [static] |
smbcquotas.c の 40 行で定義されています。