From e8b3d156c77d3f1d28474c3355b1662a5dc1b386 Mon Sep 17 00:00:00 2001 From: wangdi Date: Fri, 12 Aug 2005 04:55:41 +0000 Subject: [PATCH] Branch HEAD add type check in set_crypt --- lustre/utils/obd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c index 66d4a83..e9bd9fa 100644 --- a/lustre/utils/obd.c +++ b/lustre/utils/obd.c @@ -1995,6 +1995,11 @@ int jt_set_lkey_type(int argc, char **argv) IOC_INIT(data); + if (strcmp(type, "gks") && strcmp(type, "mks")) { + fprintf(stderr, "Invalid type %s Only support gks or mks \n", + type); + return -EINVAL; + } data.ioc_inllen1 = strlen(type) + 1; data.ioc_inlbuf1 = type; -- 1.8.3.1