Print this page
8858 /usr/bin/grep doesn't support -E option
4580 /usr/bin/grep can't handle multibyte characters
8929 8868 tests are not delivered with system/test/utiltest
8860 Example in grep(1) is incorrect
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuripv@gmx.com>


 393                         ZFS_ACL_ERR_STR=$(chgusr_exec $user $node 2>&1)
 394                         return $? ;;
 395                 esac
 396         fi
 397 }
 398 
 399 #
 400 # Get the given file/directory xattr
 401 #
 402 # $1 object -- file or directroy
 403 #
 404 function get_xattr #<obj>
 405 {
 406         typeset obj=$1
 407         typeset xattr
 408         if (( ${#obj} == 0 )); then
 409                 return 1
 410         fi
 411 
 412         for xattr in `runat $obj ls | \
 413                 /usr/xpg4/bin/egrep -v -e SUNWattr_ro -e SUNWattr_rw` ; do
 414                 runat $obj sum $xattr
 415         done
 416 }
 417 
 418 #
 419 # Get the owner of a file/directory
 420 #
 421 function get_owner #node
 422 {
 423         typeset node=$1
 424         typeset value
 425 
 426         if [[ -z $node ]]; then
 427                 log_fail "node are not defined."
 428         fi
 429 
 430         if [[ -d $node ]]; then
 431                 value=$(ls -dl $node | awk '{print $3}')
 432         elif [[ -e $node ]]; then
 433                 value=$(ls -l $node | awk '{print $3}')




 393                         ZFS_ACL_ERR_STR=$(chgusr_exec $user $node 2>&1)
 394                         return $? ;;
 395                 esac
 396         fi
 397 }
 398 
 399 #
 400 # Get the given file/directory xattr
 401 #
 402 # $1 object -- file or directroy
 403 #
 404 function get_xattr #<obj>
 405 {
 406         typeset obj=$1
 407         typeset xattr
 408         if (( ${#obj} == 0 )); then
 409                 return 1
 410         fi
 411 
 412         for xattr in `runat $obj ls | \
 413                 /usr/bin/egrep -v -e SUNWattr_ro -e SUNWattr_rw` ; do
 414                 runat $obj sum $xattr
 415         done
 416 }
 417 
 418 #
 419 # Get the owner of a file/directory
 420 #
 421 function get_owner #node
 422 {
 423         typeset node=$1
 424         typeset value
 425 
 426         if [[ -z $node ]]; then
 427                 log_fail "node are not defined."
 428         fi
 429 
 430         if [[ -d $node ]]; then
 431                 value=$(ls -dl $node | awk '{print $3}')
 432         elif [[ -e $node ]]; then
 433                 value=$(ls -l $node | awk '{print $3}')