Ticket #1031 (closed defect: fixed)

Opened 9 months ago

Last modified 9 months ago

POSIX client tool for device creation doesn't set mode correctly

Reported by: https://www.google.com/accounts/o8/id?id=AItOawkfar6gGD3PuUixQdEZQyRr2mpowLW1A70 Owned by: solj
Priority: major Milestone: Bcfg2 1.2.0 Release
Component: bcfg2-client Version: 1.0
Keywords: Cc:

Description

It appears that when assigning a mode attribute to a Path of type device the permission created on disk is not as expected.

<Path type='device' name='/var/lib/bind/dev/null' owner='root' group='root' dev_type='char' major='1' minor='3' mode='0777'/>

Results in a file with permissions 0755.

The calcPerms method in Client/Tools?/POSIX.py returns a value sent to os.mknod. It is not clear whether the problem is with os.mknod and the permissions mask or the value generated by calcPerms.

docs for os.mknod:

"mode specifies both the permissions to use and the type of node to be created, being combined (bitwise OR) with one of stat.S_IFREG, stat.S_IFCHR, stat.S_IFBLK, and stat.S_IFIFO (those constants are available in stat)"

Could this either be fixed to work as expected or the correct mode setting be documented? mode is not listed at  http://docs.bcfg2.org/server/configurationentries.html?highlight=posix

Attachments

Change History

Changed 9 months ago by solj

  • owner changed from desai to solj
  • status changed from new to accepted

Changed 9 months ago by solj

  • status changed from accepted to closed
  • resolution set to fixed

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

Add/Change #1031 (POSIX client tool for device creation doesn't set mode correctly)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.