Масляник (Maślanik) is not a common name. In both Ukrainian and Polish the name is the masculine form of the feminine noun Маслянка (Maślanka) meaning 'BUTTERMILK'. It is pronounced 'mas-lia-nik' (Ukrainian) and 'mash-la-nik' (Polish). The adjective Масляни (Maślany), 'buttered', and the noun Масло (Masło), 'butter', both link the name to butter.
I understand that in the region from which a barer of this name came, surnames were not used amongst the general public until the late 1600s when nicknames would be used to discriminate between people with the same Christian name. These names, however, were generally not passed from generation to generation, this custom only appeared in the first half of the 18th century. Despite this and over the next 100 years or so, names were often modified within a given family both by spelling and by suffixes. By 1850 this practice, of developing surnames, had mostly ended.
The first Масляник (Maślanik) of whom we have any record was Stephanus Maślanik, born about 1757, his death was recorded in 1797 in the Greek Catholic registers of the parish of Wisłok Wielki (Polish) near Sanok. His family appear in Austrian Cadestral (Taxation) records of 1787.
Most likely the name is a metonymic1 occupational name and refers to the occupation of those who first adopted it. My guess is that originally Масляник (Maślanik) was applied to makers or sellers of dairy produce.
It may also be a patronymic from a personal name or nickname derived from Масло (Masło) 'butter', or a nickname for someone who was as-soft-as-butter or their complexion or colour was butter-like; it is hard to work out what the association was that originally caused people to associate a particular person or family with this particular name.
It is very likely that the name Масляник (Maślanik) is Carpatho-Rusyn2. However, there are 'Масляників (Maslanyks)' in the Ukraine and Russia. It may be that these groups with the same surname are unrelated and appeared simultaneously in different countries in the first half of the 17th century.
1 Metonymic: characterised by the use of the name of one thing for that of another of which it is an attribute or with which it is associated.
2 Carpatho-Rusyns originally lived in the Carpathian Mountains and have a distinct culture, more information about their customs, traditions and dialect can be viewed at www.carpatho-rusyn.org.