RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 627832 - [RFE] guestfish should print outputs in a suitable base (eg. octal for modes)
Summary: [RFE] guestfish should print outputs in a suitable base (eg. octal for modes)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.1
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 582891 583242 613593
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-27 05:13 UTC by Jinxin Zheng
Modified: 2015-09-28 02:25 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.7.17-4.el6
Doc Type: Enhancement
Doc Text:
Some guestfish commands print integer results. In some cases, namely for file permissions, the natural radix for these results is octal. Instead, guestfish returned decimal integer results for commands such as umask. This has been corrected, and guestfish commands that return integers now return them in the natural radix for that number.
Clone Of: 583242
Environment:
Last Closed: 2011-05-19 11:45:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0586 0 normal SHIPPED_LIVE Low: libguestfs security, bug fix, and enhancement update 2011-05-19 11:44:03 UTC

Description Jinxin Zheng 2010-08-27 05:13:50 UTC
Clone to RHEL 6 to ensure it will get fixed in 6.1.

+++ This bug was initially created as a clone of Bug #583242 +++

+++ This bug was initially created as a clone of Bug #582891 +++

Description of problem:
1. umask should return the current umask when called with no parameter, and should set the umask when it is called with a parameter. It can only return the previous umask but not the current umask. Or There should be a separate cmd to provide this feature(like " mount"/"mounts")

2. the return value should be more human readable.
The return value now is just calculate the oct bit value, which is very confused.
e.g. 
current return value is 18 for mode 022, instead of "022" or "0022"
022->000 010 010->2^1+2^4->18


Version-Release number of selected component (if applicable):
libguestfs-1.0.85-1.fc12.3.x86_64,  latest git version

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

--- Additional comment from rjones on 2010-04-17 17:36:15 EDT ---

Fix posted upstream:
http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=4f376dbafb78ee9b5ad1652360472a14de64753d

Comment 1 Richard W.M. Jones 2010-10-16 13:35:54 UTC
Setting version to 6.1.
This will be fixed by a rebase (bug 613593).

Comment 2 Richard W.M. Jones 2011-01-04 14:09:43 UTC
Fixed by the rebase.

Comment 4 Yufang Zhang 2011-02-15 03:04:10 UTC
QA verified this bug with libguestfs-1.7.17-12.el6.x86_64 and
guestfish-1.7.17-12.el6.x86_64:

><fs> umask 0022
022
><fs> get_umask
022
><fs> umask 0024
022
><fs> get-umask 
024

So change this bug to VERIFIED.

Comment 7 Laura Bailey 2011-04-19 01:36:47 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Some guestfish commands print integer results. In some cases, namely for file permissions, the natural radix for these results is octal. Instead, guestfish returned decimal integer results for commands such as umask. This has been corrected, and guestfish commands that return integers now return them in the natural radix for that number.

Comment 8 Richard W.M. Jones 2011-04-19 07:39:18 UTC
This is OK, thanks.

Comment 9 errata-xmlrpc 2011-05-19 11:45:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0586.html

Comment 10 errata-xmlrpc 2011-05-19 13:10:27 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0586.html


Note You need to log in before you can comment on or make changes to this bug.