Operating Systems 2017F: Assignment 4: Difference between revisions
No edit summary  | 
				No edit summary  | 
				||
| Line 1: | Line 1: | ||
These questions refer to the code from [[Operating Systems 2017F: Tutorial 7|Tutorial 7]] and [[Operating Systems 2017F: Tutorial   | These questions refer to the code from [[Operating Systems 2017F: Tutorial 7|Tutorial 7]] and [[Operating Systems 2017F: Tutorial 8|Tutorial 8]].  | ||
==Full Questions==  | ==Full Questions==  | ||
Revision as of 16:40, 4 December 2017
These questions refer to the code from Tutorial 7 and Tutorial 8.
Full Questions
- To enable public key (password-less) authentication in ssh, a user's public key should be added to what file on the remote system?
 - In ssh (on the Linux command line), in what file is a user's private key normally stored?
 - How do sshfs inode values relate to the inodes in the remotely mounted filesystem?
 - What lines in memoryll determine the inode numbers?
 - In sshfs, do a file's uid and gid values come from the remote server or from the mounting user's uid and gid?
 - What permissions does a process require for regular file access?
 - In sshfs, what determines whether a file operation is allowed or not, the remote ssh daemon, the remote kernel, the local kernel, or the local ssh process?
 - When you run fusermount via execve, what euid does fusermount's process have?
 - What environment variable allows ssh to connect to the local authentication agent?
 - Why must ssh private keys only be readable by the owner?
 - How do you control how many bytes dd writes with each write system call?
 - When you make a write system call to a file on a sshfs-mounted filesystem, how many additional write (or writev) system calls must be executed, and what processes make those system calls?
 
Multiple Choice
- To enable public key (password-less) authentication in ssh, a user's public key should be added to what file on the remote system?
- /etc/passwd
 - ~/.ssh/authorized_keys
 - ~/.ssh/known_hosts
 - ~/.ssh/id_rsa.pub
 - ~/.ssh/id_rsa
 
 -  In ssh (on the Linux command line), in what file is a user's private key normally stored?
- /etc/passwd
 - ~/.ssh/authorized_keys
 - ~/.ssh/known_hosts
 - ~/.ssh/id_rsa.pub
 - ~/.ssh/id_rsa
 
 -  How do sshfs inode values relate to the inodes in the remotely mounted filesystem?
- The sshfs inode values are identical to those on the remote filesystem.
 - The sshfs inode values have no relationship to the remote filesystem inode values.
 - The sshfs inode values are the remote inode numbers plus a fixed offset.
 - The sshfs inode values are sometimes the same as the remote inode values, and sometimes they are different.
 
 -  What lines in memoryll determine the inode numbers?
- Line 14, self.ino += 1
 - Line 18, self.ino = 1
 - Both Line 14 and 18
 - None of the above
 
 -  In sshfs, do a file's uid and gid values come from the remote server or from the mounting user's uid and gid?
- From the remote server.
 - From the mounting user's uid and gid.
 
 - Which of the following is sufficient to allow a process to be able to read a regular file?
- Process's uid matches the file's uid.
 - Process's gid matches the file's gid.
 - The process's uid and gid match the file's uid and gid.
 - None of the above.
 
 -  In sshfs, what determines whether a file operation is allowed or not?
- the remote ssh daemon
 - the remote kernel
 - the local kernel
 - the local ssh process
 
 -  When you run fusermount via execve, what euid does fusermount's process have?
- euid is equal to the uid of the calling user (process that did the execve of fusermount)
 - euid is the uid of fuse
 - euid=0 (root)
 - None of the above
 
 -  What environment variable allows ssh to connect to the local authentication agent?
- SSH_AUTH_SOCK
 - TERM
 - SSH_AGENT_LAUNCHER
 - DISPLAY
 
 -  Why must ssh private keys only be readable by the owner?
- Other regular users on the system could use the private key to impersonate the owner.
 - ssh and ssh-add will refuse to use the key.
 - Both (a) and (b)
 - None of the above
 
 -  What option to you give to dd to control how many bytes dd writes with each write system call?
- bs=
 - ibs=
 - count=
 - None of the above
 
 -  When you make a write system call to a file on a sshfs-mounted filesystem (to a file that the user has write access to) , which of the following also happens?
- A remote sftp-server process does a write system call.
 - The local kernel makes a write system call.
 - The remote kernel makes a write system call.
 - All of the above.