1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
lvm2/tools
Peter Rajnoha 4988d799a2 liblvm2cmd: recognize quotes properly when splitting cmd line string into argv array fields
Fix lvm_split that is called when cmd line string is separated into
argv fields to recognize quote chars ('\'" and '"') properly and
when these quotes are used, consider the text within quotes as one
argument, do not separate it based on space characters inside.

The lvm_split is used during processing lvm shell command line or
when calling lvm commands through cmdlib (e.g. dmeventd plugins).

For example, the lvm shell scenario:

Before this patch:
$lvm
lvm> lvs --config 'global{ suffix=0 }'
  Parse error at byte 9 (line 1): unexpected token
  Failed to set overridden configuration entries.

With this patch applied:
$lvm
lvm> lvs --config 'global{ suffix=0 }'
  LV    VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log  Cpy%Sync Convert
  root  fedora -wi-ao----   9.00g
  swap  fedora -wi-ao---- 512.00m

(Exactly the same problem is hit when calling LVM commands with
quoted arguments via lvm2cmd lib in dmeventd plugins.)
2014-10-17 14:03:43 +02:00
..
.exported_symbols generate liblvm2cmd exported symbols too 2010-06-25 18:23:10 +00:00
.gitignore More .gitignore files for an in-source-tree build. 2012-06-08 16:34:43 +01:00
args.h lvconvert: options splitcache, split, uncache 2014-10-06 15:18:05 +02:00
cmdnames.h Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
commands.h lvconvert: options splitcache, split, uncache 2014-10-06 15:18:05 +02:00
dmsetup.c cleanup: simplier struct init 2014-08-19 14:33:07 +02:00
dumpconfig.c dumpconfig: add --type profilable-command/profilable-metadata, --metadataprofile/--commandprofile 2014-05-20 16:27:07 +02:00
errors.h lvresize: separate validation from action 2013-07-06 03:28:21 +01:00
formats.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvchange.c lvchange: Allow appropriate actions on cache (in addition to thin) pools. 2014-10-13 16:21:41 +02:00
lvconvert.c toollib: validate_restricted_lvname_param 2014-10-08 11:35:50 +02:00
lvcreate.c toollib: validate_restricted_lvname_param 2014-10-08 11:35:50 +02:00
lvdisplay.c report: select: add --select arg to pvdisplay, vgdisplay and lvdisplay 2014-06-17 16:27:20 +02:00
lvextend.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
lvm2cmd-static.c Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
lvm2cmd.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvm2cmd.h lvresize: separate validation from action 2013-07-06 03:28:21 +01:00
lvm2cmdline.h Support repetition of --addtag and --deltag arguments. 2010-11-11 17:29:05 +00:00
lvm-static.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvm.c readline: switch to new-style readline typedef 2014-03-06 17:28:40 +01:00
lvmchange.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
lvmcmdlib.c cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
lvmcmdline.c liblvm2cmd: recognize quotes properly when splitting cmd line string into argv array fields 2014-10-17 14:03:43 +02:00
lvmdiskscan.c filters: add cmd->full_filter - composite of cmd->filter and cmd->lvmetad_filter 2014-10-02 13:06:46 +02:00
lvreduce.c Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
lvremove.c vgremove: Use process_each_lv_in_vg. 2014-10-07 16:45:45 +01:00
lvrename.c cleanup: Use lv_is_ macros. 2014-09-15 21:33:53 +01:00
lvresize.c cleanup: drop unused variable 2014-09-28 13:49:01 +02:00
lvscan.c commands: support shortcut -H for cache objects 2014-10-06 15:18:05 +02:00
Makefile.in makefiles: link blkid library only to lvm 2014-03-06 17:30:10 +01:00
polldaemon.c report: select: refactor: move percent handling code to libdm for reuse 2014-06-17 16:27:21 +02:00
polldaemon.h cleanup: constify activation usage of lv pointer 2014-09-24 10:54:47 +02:00
pvchange.c report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
pvck.c Move the core of the lib/config/config.c functionality into libdevmapper, 2011-08-30 14:55:15 +00:00
pvcreate.c pvcreate: Fix cache state with filters/sig wiping. 2014-08-14 01:30:01 +01:00
pvdisplay.c toollib: Rewrite process_each_pv. 2014-10-07 01:15:43 +01:00
pvmove.c cleanup: Remove metadata.h from tools dir. 2014-09-17 15:50:24 +01:00
pvremove.c cleanup: Remove metadata.h from tools dir. 2014-09-17 15:50:24 +01:00
pvresize.c toollib: Rewrite process_each_pv. 2014-10-07 01:15:43 +01:00
pvscan.c commands: support shortcut -H for cache objects 2014-10-06 15:18:05 +02:00
reporter.c toollib: Rewrite process_each_pv. 2014-10-07 01:15:43 +01:00
segtypes.c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
stub.h Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
tags.c tools: Add internal tags command. 2014-01-30 13:09:15 +00:00
toollib.c toollib: remove unsed variable in process_each_segment_in_pv 2014-10-16 15:16:52 -05:00
toollib.h toollib: validate_restricted_lvname_param 2014-10-08 11:35:50 +02:00
tools.h vgremove: Use process_each_lv_in_vg. 2014-10-07 16:45:45 +01:00
vgcfgbackup.c cleanup: stack usage 2013-07-01 23:11:14 +02:00
vgcfgrestore.c vgcfgrestore: return invalid cmd line 2014-05-21 23:14:41 +02:00
vgchange.c filters: refresh filters when lvmetad use is toggled 2014-09-30 16:08:05 +02:00
vgck.c filters: refresh filters when lvmetad use is toggled 2014-09-30 16:08:05 +02:00
vgconvert.c vgcreate: Permit non-power-of-2 extent sizes. 2014-10-14 18:12:15 +01:00
vgcreate.c conf: add allocation/physical_extent_size config option for default PE size of VGs. 2014-09-12 10:09:21 +02:00
vgdisplay.c vgremove: Use process_each_lv_in_vg. 2014-10-07 16:45:45 +01:00
vgexport.c cleanup: vgexport drops pv pointer 2014-03-30 23:44:59 +02:00
vgextend.c vgextend: allow --yes to skip prompt 2014-05-23 23:35:40 +02:00
vgimport.c vgimport/vgexport: return invalid cmd 2014-03-30 23:40:27 +02:00
vgmerge.c vgsplit: Fix VG component of lvid. 2014-07-03 19:06:04 +01:00
vgmknodes.c cleanup: introduce return_ECMD_FAILED macro 2013-07-01 23:10:33 +02:00
vgreduce.c vgreduce: Use process_each_pv. 2014-10-07 01:15:43 +01:00
vgremove.c vgremove: Use process_each_lv_in_vg. 2014-10-07 16:45:45 +01:00
vgrename.c report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
vgscan.c commands: support shortcut -H for cache objects 2014-10-06 15:18:05 +02:00
vgsplit.c cleanup: Remove metadata.h from tools dir. 2014-09-17 15:50:24 +01:00