Changeset 1195 for TI05-delivery
- Timestamp:
- 15/06/06 15:51:43 (15 years ago)
- Location:
- TI05-delivery/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TI05-delivery/trunk/lib/python/delivery/server.py
r1187 r1195 11 11 12 12 import bbftpd 13 14 class TROPT: 15 """Static class containing constants used by bbftp in the transferoption parameter. 16 17 TROPT.X always corresponds to TROPT_X as defined in bbftpd/structures.h. 18 Options that aren't likely to be used for the delivery service are not 19 included (e.g. TROPT_RFIO). 20 21 @cvar TMP always use temporary name. 22 @cvar ACC keep access and modification time. 23 @cvar MODE keep mode. 24 @cvar DIR create all dirs in path. 25 """ 26 TMP = bbftpd.TROPT_TMP 27 ACC = bbftpd.TROPT_ACC 28 MODE = bbftpd.TROPT_MODE 29 DIR = bbftpd.TROPT_DIR 30 31 class MSG: 32 """Static class containing message codes used by bbftp. 33 34 MSG.X corresponds to MSG_X or MSG_X_V2 as defined in bbftpd/structures.h. 35 Message codes not returned by the auth/authz interface are not included. 36 37 @cvar CHDIR a chdir request. 38 @cvar LIST a ls/dir request. 39 @cvar MKDIR a mkdir request. 40 @cvar RM a rm request. 41 @cvar STAT a stat request. 42 @cvar DF a statfs request. 43 """ 44 CHDIR = bbftpd.MSG_CHDIR_V2 45 LIST = bbftpd.MSG_LIST_V2 46 MKDIR = bbftpd.MSG_MKDIR_V2 47 RM = bbftpd.MSG_RM 48 STAT = bbftpd.MSG_STAT 49 DF = bbftpd.MSG_DF 50 51 52 #-------------------------------------------------------------------------------------------------------------- 13 53 14 54 def start(authHandler, args): -
TI05-delivery/trunk/src/bbftp-server-3.2.0/includes/ndg.h
r1141 r1195 10 10 */ 11 11 12 #include <bbftpd.h> 13 #include <netinet/in.h> 14 #include <structures.h> 12 15 13 16 /* The logmessage size limit is hard coded into the bbFTP source. I define a macro here to avoid -
TI05-delivery/trunk/src/python_ext/bbftpd.c
r1187 r1195 9 9 * 10 10 */ 11 11 12 12 13 #include <Python.h> 13 14 #include <ndg.h> 15 14 16 15 17 extern char **environ; … … 377 379 }; 378 380 381 382 #define ADDCONST(m,x) PyModule_AddIntConstant(m, #x, x) 383 379 384 PyMODINIT_FUNC initbbftpd(void) { 380 (void) Py_InitModule("bbftpd", BbftpdMethods); 381 } 382 385 PyObject *mod; 386 387 mod = Py_InitModule("bbftpd", BbftpdMethods); 388 389 ADDCONST(mod, MSG_CHDIR_V2); 390 ADDCONST(mod, MSG_CHDIR_V2); 391 ADDCONST(mod, MSG_LIST_V2); 392 ADDCONST(mod, MSG_MKDIR_V2); 393 ADDCONST(mod, MSG_RM); 394 ADDCONST(mod, MSG_STAT); 395 ADDCONST(mod, MSG_DF); 396 397 ADDCONST(mod, TROPT_TMP); 398 ADDCONST(mod, TROPT_ACC); 399 ADDCONST(mod, TROPT_MODE); 400 ADDCONST(mod, TROPT_DIR); 401 ADDCONST(mod, TROPT_GZIP); 402 ADDCONST(mod, TROPT_RFIO); 403 ADDCONST(mod, TROPT_RFIO_O); 404 ADDCONST(mod, TROPT_QBSS); 405 406 } 407 -
TI05-delivery/trunk/test/test_embedded.py
r1187 r1195 71 71 72 72 def authzControl(self, msgcode, transferopt, path): 73 # Ignore what is being authorised for now, just authorise if read allowed73 syslog.syslog(syslog.LOG_DEBUG, 'TestPermAuthzHandler.authzControl: msgcode = %s' % hex(msgcode)) 74 74 return self.authzPath(path) 75 75 … … 318 318 319 319 self.assertLines(['Connection and authentication correct', 'stat /.*/foo OK'], output) 320 self.assertLines(['.*Authz: MSG_STAT .*/foo', '.*TestPermAuthzHandler OK'], lines) 320 self.assertLines(['.*Authz: MSG_STAT .*/foo', '.*TestPermAuthzHandler OK', 321 '.*TestPermAuthzHandler.*msgcode = %s.*' % hex(server.MSG.STAT)], lines) 321 322 322 323 def testFail(self):
Note: See TracChangeset
for help on using the changeset viewer.