Bug 1270 - Vzctl config file symlink
Vzctl config file symlink
Status: CLOSED FIXED
Product: OpenVZ
Classification: Unclassified
Component: vzctl
unspecified
Other Other
: P2 enhancement
Assigned To: Igor Sukhih
: 1359 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-18 11:51 EDT by xavier martin
Modified: 2015-04-01 14:43 EDT (History)
2 users (show)

See Also:


Attachments
apply to 3.0.23 (2.56 KB, patch)
2009-05-18 11:51 EDT, xavier martin
Details | Diff
canonicalize_fine_name (855 bytes, patch)
2009-05-19 10:00 EDT, xavier martin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description xavier martin 2009-05-18 11:51:41 EDT
Created attachment 969 [details]
apply to 3.0.23

vzctl is unable to handle symlink files for config file in certain case ( cross-device )

I've made a patch which handle this.
Comment 1 Kir Kolyshkin 2009-05-19 08:29:40 EDT
Looks good, but can we use canonicalize_file_name(3) for that?
Comment 2 xavier martin 2009-05-19 10:00:18 EDT
Created attachment 970 [details]
canonicalize_fine_name
Comment 3 xavier martin 2009-05-19 10:00:46 EDT
indeed, it works as expected
Comment 4 Kir Kolyshkin 2009-05-20 07:21:56 EDT
1. you need to free() the result of canonicalize_file_name()
2. the proper way to #define _GNU_SOURCE is:

#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
Comment 5 Kir Kolyshkin 2009-10-16 10:10:00 EDT
Fixed in GIT:
http://git.openvz.org/?p=vzctl;a=commit;h=35c8a3e3c963446e98b087ea629f32647512af25

Plus an improvement related to this bugreport:
http://git.openvz.org/?p=vzctl;a=commit;h=51e5e8708c3a590dec70f38668894a3e06a70c0f

Will be available in vzctl >= 3.0.24.
Comment 6 Kir Kolyshkin 2009-11-05 14:21:44 EST
*** Bug 1359 has been marked as a duplicate of this bug. ***
Comment 7 Sergey Bronnikov 2015-04-01 14:43:17 EDT
Bug was fixed more than one year ago and there were no complains from reporter after fix. We believe bug fix helped and mark bug as closed.