~ubuntu-branches/ubuntu/wily/libcap-ng/wily-proposed

« back to all changes in this revision

Viewing changes to utils/filecap.c

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Chifflier
  • Date: 2010-07-20 10:03:49 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100720100349-dzex7pirrlq8v7g7
Tags: 0.6.4-1
* Imported Upstream version 0.6.4
* Bump Standards version to 3.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
                        free(path);
154
154
                }
155
155
        } else if (path == NULL && dir == NULL && show_all == 1) {
 
156
                // Find files
156
157
                nftw("/", check_file, 1024, nftw_flags);
157
158
        } else if (dir) {
 
159
                // Print out the dir
158
160
                nftw(dir, check_file, 1024, nftw_flags);
159
161
        }else if (path && capabilities == 0) {
 
162
                // Print out specific file
160
163
                check_file(path, NULL, 0, NULL);
161
164
        } else if (path && capabilities == 1) {
 
165
                // Write capabilities to file
162
166
                int fd = open(path, O_WRONLY|O_NOFOLLOW);
163
167
                if (fd < 0) {
164
168
                        printf("Could not open %s for writing (%s)\n", path,