Changeset 224 for branches/samba-3.3.x/source/torture
- Timestamp:
- May 24, 2009, 7:55:48 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/torture/torture.c
r223 r224 5015 5015 TALLOC_FREE(subst); 5016 5016 return result; 5017 } 5018 5019 static bool run_uid_regression_test(int dummy) 5020 { 5021 static struct cli_state *cli; 5022 int16_t old_vuid; 5023 bool correct = True; 5024 5025 printf("starting uid regression test\n"); 5026 5027 if (!torture_open_connection(&cli, 0)) { 5028 return False; 5029 } 5030 5031 cli_sockopt(cli, sockops); 5032 5033 /* Ok - now save then logoff our current user. */ 5034 old_vuid = cli->vuid; 5035 5036 if (!cli_ulogoff(cli)) { 5037 d_printf("(%s) cli_ulogoff failed: %s\n", 5038 __location__, cli_errstr(cli)); 5039 correct = false; 5040 goto out; 5041 } 5042 5043 cli->vuid = old_vuid; 5044 5045 /* Try an operation. */ 5046 if (!cli_mkdir(cli, "\\uid_reg_test")) { 5047 /* We expect bad uid. */ 5048 if (!check_error(__LINE__, cli, ERRSRV, ERRbaduid, 5049 NT_STATUS_NO_SUCH_USER)) { 5050 return False; 5051 } 5052 goto out; 5053 } 5054 5055 cli_rmdir(cli, "\\uid_reg_test"); 5056 5057 out: 5058 5059 torture_close_connection(cli); 5060 return correct; 5017 5061 } 5018 5062 … … 5533 5577 {"OPEN", run_opentest, 0}, 5534 5578 {"POSIX", run_simple_posix_open_test, 0}, 5579 { "UID-REGRESSION-TEST", run_uid_regression_test, 0}, 5535 5580 #if 1 5536 5581 {"OPENATTR", run_openattrtest, 0},
Note:
See TracChangeset
for help on using the changeset viewer.