summaryrefslogtreecommitdiff
path: root/src/cstore
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-07-14 18:49:09 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-07-15 11:59:04 -0500
commit63ce0b05d99225496f31ba9fd444ab2fefdc37e9 (patch)
tree133892a3e8e960568cfdd3a6925873bbf39eaaf8 /src/cstore
parentb08d6b7d0cd2d62da49f3c76d220a6860240791e (diff)
downloadvyatta-cfg-63ce0b05d99225496f31ba9fd444ab2fefdc37e9.tar.gz
vyatta-cfg-63ce0b05d99225496f31ba9fd444ab2fefdc37e9.zip
Don't allow users to set migration comments
(cherry picked from commit 9f1ff5427e0f72f2bded287be6e1d4cf442945cb)
Diffstat (limited to 'src/cstore')
-rw-r--r--src/cstore/cstore.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cstore/cstore.cpp b/src/cstore/cstore.cpp
index 9a5961f..c86631b 100644
--- a/src/cstore/cstore.cpp
+++ b/src/cstore/cstore.cpp
@@ -997,6 +997,16 @@ Cstore::commentCfgPath(const Cpath& args)
output_user("Cannot use the '*' character in a comment\n");
return false;
}
+ if (comment.find("CONFIGURATION COMMENTED OUT DURING MIGRATION BELOW") != string::npos){
+ // Don't allow users to set configuration migration comments
+ output_user("Cannot use the string 'CONFIGURATION COMMENTED OUT DURING MIGRATION BELOW' in a comment\n");
+ return false;
+ }
+ if (comment.find("CONFIGURATION COMMENTED OUT DURING MIGRATION ABOVE") != string::npos){
+ // Don't allow users to set configuration migration comments
+ output_user("Cannot use the string 'CONFIGURATION COMMENTED OUT DURING MIGRATION ABOVE' in a comment\n");
+ return false;
+ }
bool ret = false;
{